简体   繁体   English

错误:将字节码转换为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 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.29.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.

相关问题 将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Lcom / RNFetchBlob / RNFetchBlobConst; - Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/RNFetchBlob/RNFetchBlobConst; 将字节码转换为dex:原因:com.android.dex.DexException:定义了多个dex文件 - converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define com.android.dex.DexException:多个dex文件定义了Lcom / google / android / gms / location / places / PlaceReport; - com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/location/places/PlaceReport; Gradle 构建错误将字节码转换为 dex 时出错:原因:com.android.dex.DexException:多个 dex 文件定义 Landroid/arch/lifecycle/liveData$1 - Gradle build error Error converting bytecode to dex:Cause: com.android.dex.DexException:Multiple dex files define Landroid/arch/lifecycle/liveData$1 未知源文件:com.android.dex.DexException:多个dex文件定义了Lcom / google / android / gms / internal / zzpq; - Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzpq; com.android.dex.DexException:多个dex文件定义了Lcom / facebook / internal / Utility $ GraphMeRequestWithCacheCallback; - com.android.dex.DexException: Multiple dex files define Lcom/facebook/internal/Utility$GraphMeRequestWithCacheCallback; 错误:com.android.dex.DexException:多个dex文件定义了Ledu / umd / cs / findbugs / annotations / NonNull; - Error:com.android.dex.DexException: Multiple dex files define Ledu/umd/cs/findbugs/annotations/NonNull; 错误多个dex文件定义了Lcom / google / android / gms / location / places / zza; - ERROR Multiple dex files define Lcom/google/android/gms/location/places/zza; com.android.dex.DexException:多个dex文件定义Lorg / hamcrest / Description; - com.android.dex.DexException: Multiple dex files define Lorg/hamcrest/Description; 意外的顶级异常:com.android.dex.DexException:多个dex文件定义 - UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM