错误:将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Lcom/google/android/gms/common/api/zza; [英] Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zza;

查看:133
本文介绍了错误:将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Lcom/google/android/gms/common/api/zza;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此错误:

错误:将字节码转换为dex时出错:原因: com.android.dex.DexException:多个dex文件定义 Lcom/google/android/gms/common/api/zza;

Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zza;

我没有解决方法,请帮忙.

I am not getting how to solve this, please help.

我不知道是否要包含一些lib或什么

I don't know whether to include some lib or what

推荐答案

当您在应用程序build.gradle中有重复的依赖项条目时,通常会出现Multiple dex files define的问题.在这种情况下,您有重复的Firebase依赖项.

The problems of Multiple dex files define usually arise when you have duplicate dependency entry in your app build.gradle. In this case, you have a duplicate Firebase dependencies.

您需要使用相同版本的9.0.29.6.1:

You need to use the same version either 9.0.2 or 9.6.1:

compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.google.firebase:firebase-database:9.0.2'

compile 'com.google.firebase:firebase-auth:9.6.1'
compile 'com.google.firebase:firebase-database:9.6.1'

请注意 ,如果您使用某些支持库版本(例如24.0.0),则Firebase可能会出现兼容性问题.您需要使用最新的支持库或找到兼容的Firebase版本.进一步了解编译com.android.support时出现android错误. :support-v4:24.0.0

Please be aware that if you use some support library version like 24.0.0 there is a chance for compatibility issue with firebase. You need to use the latest of support library or find the compatible firebase version. Read more at android error while compiling com.android.support:support-v4:24.0.0

这篇关于错误:将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Lcom/google/android/gms/common/api/zza;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆