gpt4 book ai didi

java - 模块中的不同 Google Play 服务

转载 作者:太空宇宙 更新时间:2023-11-04 12:24:34 25 4
gpt4 key购买 nike

我有一个关于这个主题的帖子,但内容很详细。我不确定我的错误,所以这是我的基本问题:

是否可以在模块中使用不同的 Google Play 服务?

项目结构:

  • 应用程序
    • 应用模块
    • 模块 2 Goolge Play 服务 6.1.71
    • 模块 3( map )播放服务 9.2.1

最佳答案

我最近也遇到过类似的问题。我使用的是 Google Play Services 版本 9.0.2

的以下模块

1) 添加

2) 分析

3) 应用索引

4) 授权

但是,我需要在我的应用程序中添加新功能的依赖项。

'compile 'com.firebase:firebase-jobdispatcher-with-gcm-dep:0.5.2'

上述库依赖于 Google Play ServicesGcm 模块的 10.0.1 版本。我的 gradle 同步在 Android Studio 中成功,但是当我尝试构建 apk 时,出现以下错误。

  Execution failed for task ':app:transformClassesWithJarMergingForLoggedMyAppProgDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzabt$1.class

根据异常(exception)情况,我的构建具有来自两个不同模块的相同文件。发生这种情况是因为构建中包含了不同版本的 Play 服务。由于我需要使用 firebase 库,因此我必须更新所有其他模块才能使用 Google Play Services 版本 10.0.1

关于java - 模块中的不同 Google Play 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38503976/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com