简体   繁体   English

没有找到类“com.google.android.gms.common.internal.zzaa”

[英]Didn't find class “com.google.android.gms.common.internal.zzaa”

i am unable to resolve this error我无法解决此错误

Didn't find class "com.google.android.gms.common.internal.zzaa" on path: DexPathList[[zip file "/data/app/com.birthday.photoframe.birthday_frames.birthday_cake-1/base.apk"],nativeLibraryDirectories=[/data/app/com.birthday.photoframe.birthday_frames.birthday_cake-1/lib/arm64, /system/lib64, /vendor/l在路径上没有找到类“com.google.android.gms.common.internal.zzaa”:DexPathList[[zip 文件“/data/app/com.birthday.photoframe.birthday_frames.birthday_cake-1/base.apk” ],nativeLibraryDirectories=[/data/app/com.birthday.photoframe.birthday_frames.birthday_cake-1/lib/arm64, /system/lib64, /vendor/l

here is my build.gradle file这是我的 build.gradle 文件

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"

defaultConfig {
    applicationId "com.birthday.photoframe.birthday_frames.birthday_cake"
    minSdkVersion 16
    targetSdkVersion 30
    versionCode 1
    versionName "1.0"
    multiDexEnabled true //addded
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android- 
  optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
   } }

   dependencies {

implementation 'com.android.support:multidex:2.0.0'

implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'com.google.android.material:material:1.2.1'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'

implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

implementation 'com.google.android.gms:play-services-ads:19.3.0'
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
implementation 'com.google.android.gms:play-services-appindexing:9.8.0'
}

Try adding this dependency to your gradle file:尝试将此依赖项添加到您的 gradle 文件中:

implementation 'com.android.support:multidex:1.0.3'

Also you should use the same versions for the support and play services libraries.此外,您应该为支持和播放服务库使用相同的版本。 And you should avoid using "+" for latest version.并且您应该避免在最新版本中使用“+”。

implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-ads:12.0.1'

EDIT: You may also add this part to your app level gradle file and try again.编辑:您也可以将此部分添加到您的应用程序级 gradle 文件中,然后重试。 I did not see anyone tried this but it may work.我没有看到有人尝试过这个,但它可能有效。

allprojects {
    repositories {
       //...
    }

    subprojects {
        project.configurations.all {
            resolutionStrategy.eachDependency { details ->
                if (details.requested.group == 'com.google.android.gms'
                && !details.requested.name.contains('multidex') ) {
                    details.useVersion "12.0.1"
                }
            }
        }
    }
}

2ND UPDATE: Just seen this, the dependency below, covers all the others, then it may cause a duplication issue.第二次更新:刚刚看到这个,下面的依赖项涵盖了所有其他的,那么它可能会导致重复问题。 Remove the other dependencies and leave this one:删除其他依赖项并保留这个:

implementation 'com.google.android.gms:play-services:12.0.1'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在路径上没有找到类“com.google.android.gms.common.internal.zzbq”:DexPathList - Didn't find class “com.google.android.gms.common.internal.zzbq” on path: DexPathList ClassNotFoundException找不到类“ com.google.android.gms.common.internal.zzbq - ClassNotFoundException Didn't find class "com.google.android.gms.common.internal.zzbq 放置自动完成未找到类“ com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable” - Places AutoComplete Didn't find class “com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable” 原因:java.lang.ClassNotFoundException:找不到类“ com.google.android.gms.common.internal.zzbq” - Caused by: java.lang.ClassNotFoundException: Didn't find class “com.google.android.gms.common.internal.zzbq” 原因:java.lang.ClassNotFoundException:在路径上找不到类“ com.google.android.gms.common.internal.zzbq” - Caused by: java.lang.ClassNotFoundException: Didn't find class “com.google.android.gms.common.internal.zzbq” on path 没找到上课“com.google.android.gms.common.app.GmsApplication” - Didn't find class “com.google.android.gms.common.app.GmsApplication” 找不到类“ com.google.android.gms.common.util.zzs” - Didn't find class “com.google.android.gms.common.util.zzs” 找不到[com / google / android / gms / internal / zzol]的普通超类 - Can't find common super class of [com/google/android/gms/internal/zzol] 将 targetSdkVersion 提高到 28 时,在路径上找不到类“com.google.android.gms.common.R$string”:DexPathList - When raising targetSdkVersion to 28, Didn't find class "com.google.android.gms.common.R$string" on path: DexPathList Android找不到类“ com.google.android.gms.dynamic.DeferredLifecycleHelper”错误 - Android Didn't find class “com.google.android.gms.dynamic.DeferredLifecycleHelper” Error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM