java.lang.NoClassDefFoundError:无法解决以下问题:Lcom / google / android / gms / common / internal / zzbq附近的地方应用

时间:2018-12-14 12:24:24

标签: java android

我让一个应用找到了附近的地方,但出现此错误

> Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList[[zip file "/data/app/vapelit.unikomapps.com.vapelitfinal-1/base.apk"

这是我的礼物

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
compile 'com.synnapps:carouselview:0.1.5'
compile 'com.android.support:multidex:1.0.0'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.android.gms:play-services-location:15.0.0'

} ##标题##

2 个答案:

答案 0 :(得分:1)

您需要实现这一点:

   implementation 'com.google.android.gms:play-services-maps:16.0.0'


   implementation 'com.google.android.gms:play-services-auth:16.0.0'
   implementation 'com.google.android.gms:play-services-location:16.0.0'

并将其添加到您的gradle中:

 configurations.all {
  resolutionStrategy.eachDependency { DependencyResolveDetails details ->
      def requested = details.requested
    if (requested.group == 'com.android.support') {
        if (!requested.name.startsWith("multidex")) {
            details.useVersion '28.0.0'
        }
     }
 }
}

,并且必须在您的gradle中删除它:

implementation 'com.google.android.gms:play-services-maps:15.0.0'

并仅保留此内容:

implementation 'com.google.android.gms:play-services-maps:16.0.0'

快乐编码;)

答案 1 :(得分:0)

@Agam

在您的Gradle代码中,您正在使用其他版本的Google地图库。因此,请删除旧版本库,并确保您使用的是彼此相关的所有Google Play服务库的相同版本。

尝试更新gradle文件中的下一行,并删除包含一个gradle库中所有Google Play服务文件的Google Play服务库。有关Google Play服务的模式详细信息,请访问Google Play Service Version with Table 1

implementation 'com.synnapps:carouselview:0.1.5'
implementation 'com.android.support:multidex:1.0.3'
//implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-location:16.0.0'

希望您能解决您的问题。