com.android.builder.dexing.DexArchiveMergerException [英] com.android.builder.dexing.DexArchiveMergerException
问题描述
我正在使用android studio 3.0.1,我正在使用Firebase创建一个应用程序.但是在调试时,我发现了这样的错误消息
I'm using android studio 3.0.1 , i 'm creating an app using Firebase. but while Debugging i found an error message like this
Information:Gradle任务[clean,:app:assembleDebug]
Information:Gradle tasks [clean, :app:assembleDebug]
错误:任务':app:transformDexArchiveWithExternalLibsDexMergerForDebug'的执行失败.
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException:无法合并dex
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
我尝试了前面提到的所有解决方案... 像->清洁&重建,添加multiDexEnabled true,删除.gradle目录,依此类推 但是问题直到现在都没有解决.
i tried all solutions mentioned before... Like -> Clean & Rebuild , adding multiDexEnabled true , Deleting .gradle dir ,and so on but problem didn't solve till now.
我的build.gradle应用程序依赖项如下-
My build.gradle app dependencies looks like this-
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "lapit.chat"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
}
dependencies {
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.firebaseui:firebase-ui-database:3.2.1'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.iceteck.silicompressorr:silicompressor:2.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:support-v4:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'com.google.gms.google-services'
请帮助!
推荐答案
如果在工作管理器更新后出现此错误,请尝试在build.gradle中使用以下代码
If this error is appearing after workmanager update try below code in your build.gradle
implementation("android.arch.work:work-runtime:$work_version") {
exclude group: 'com.google.guava', module: 'listenablefuture'
}
这篇关于com.android.builder.dexing.DexArchiveMergerException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!