Multiple dex files define Lcom/google/android/gms/internal/zzau

前端 未结 14 1224
[愿得一人]
[愿得一人] 2020-11-29 10:55

I get the error com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzau; when i run my app The gradle files are

ap

14条回答
  •  一向
    一向 (楼主)
    2020-11-29 11:29

    I had a similar problem after building using phonegap/cordova: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzsk;

    I fixed it by editing build.gradle(module Android), as I had 2 libraries that should have the exact same version with different version numbers (8.4.0 and 9.2.1 in my case)

    dependencies{
    ....
    //make sure are both same version (8.4.0 or 9.2.1 in my case)
    compile 'com.google.android.gms:play-services-gcm:9.2.1'
    // this is the one I changed:  compile 'com.google.android.gms:play-services-location:8.4.0'
    compile 'com.google.android.gms:play-services-location:9.2.1' // it was 8.4.0
    ....
    }
    

提交回复
热议问题