[英]Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zza;
I have this error: 我有这个错误:
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zza;
错误:将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Lcom / google / android / gms / common / api / zza;
I am not getting how to solve this, please help. 我没有解决方法,请帮忙。
I don't know whether to include some lib or what 我不知道是否包括一些lib或什么
you need to use same version of
firebase
dependencies
您需要使用相同版本的
firebase
dependencies
compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.google.firebase:firebase-database:9.0.2'
or 要么
compile 'com.google.firebase:firebase-auth:9.6.1'
compile 'com.google.firebase:firebase-database:9.6.1'
The problems of Multiple dex files define
usually arise when you have duplicate dependency entry in your app build.gradle
. 当您在应用程序
build.gradle
有重复的依赖项条目时,通常会出现Multiple dex files define
问题。 In this case, you have a duplicate Firebase dependencies. 在这种情况下,您具有重复的Firebase依赖项。
You need to use the same version either 9.0.2
or 9.6.1
: 您需要使用相同的版本
9.0.2
或9.6.1
:
compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.google.firebase:firebase-database:9.0.2'
or 要么
compile 'com.google.firebase:firebase-auth:9.6.1'
compile 'com.google.firebase:firebase-database:9.6.1'
Please be aware that if you use some support library version like 24.0.0
there is a chance for compatibility issue with firebase. 请注意 ,如果您使用某些支持库版本(例如
24.0.0
,则24.0.0
可能会出现兼容性问题。 You need to use the latest of support library or find the compatible firebase version. 您需要使用最新的支持库或找到兼容的Firebase版本。 Read more at android error while compiling com.android.support:support-v4:24.0.0
在编译com.android.support:support-v4:24.0.0时在android错误中阅读更多内容
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.