简体   繁体   中英

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq Nearby Place App

I made a app find nearby place but i get this error

> 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"

Here my gradle

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'

}## Heading ##

You need to implement this :

   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'

and add this in your 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'
        }
     }
 }
}

and in your gradle you have to delete this :

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

and keep only this:

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

Happy Coding ;)

@Agam

In your gradle code your are using google map library with different version. So remove old version library and make sure you are using same version of all google play service library which are related to each other.

Try to update below line in your gradle file and remove google play service library which include all google play services file under one gradle library. For mode details about google play service visit on 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'

I hope you will resolve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM