Multiple dex files define Lcom/google/android/gms/internal/measurement/zzabn

孤街浪徒 提交于 2019-11-27 07:39:16

问题


Since this morning I cannot build my Android app because I get this error

What went wrong: Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'. com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/measurement/zzabn;

I have tried bumping the Firebase versions accordingly to 15.0.2 but then I get an other error...

Task :app:processDebugGoogleServices Found com.google.android.gms:play-services-maps:15.0.0, but version 15.0.2 is needed for the google-services plugin.

com.google.android.gms:play-services-maps:15.0.2 is not even released yet?

I have a build to push to production, what is the best way to build the app?


回答1:


Please update the google-service plugin to:

classpath 'com.google.gms:google-services:3.3.0'

to be able to use the latest version of Firebase and to avoid the errors.

Read the following for more information:

https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html

Compilation failed to complete:Program type already present: com.google.android.gms.internal.measurement.zzabn




回答2:


(Posted solution on behalf of the question author).

Removing com.google.gms.google-services at the bottom of my build.build makes it work.



来源:https://stackoverflow.com/questions/50182756/multiple-dex-files-define-lcom-google-android-gms-internal-measurement-zzabn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!