com.android.builder.dexing.DexArchiveBuilderException:异化时出错 [英] com.android.builder.dexing.DexArchiveBuilderException: Error while dexing
问题描述
当我尝试运行我的项目时,我遇到了这个问题-
I am getting this issue when I am trying to run my project -
com.android.builder.dexing.DexArchiveBuilderException:无法处理.gradle \ caches \ transforms-1 \ files-1.1 \ firebase-analytics-impl-11.8.0.aar \ 0e3311be69809df8820438f9666651f5 \ jars \ classes.jar
com.android.builder.dexing.DexArchiveBuilderException:删除时出错.
com.android.tools.r8.CompilationFailedException:编译无法完成 com.android.tools.r8.utils.AbortException:错误:类型com.google.android.gms.common.internal.zzf被引用为com.google.android.gms.internal.zzcku
中的接口.
com.android.builder.dexing.DexArchiveBuilderException: Failed to process .gradle\caches\transforms-1\files-1.1\firebase-analytics-impl-11.8.0.aar\0e3311be69809df8820438f9666651f5\jars\classes.jar
com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
com.android.tools.r8.CompilationFailedException: Compilation failed to complete com.android.tools.r8.utils.AbortException: Error: Type com.google.android.gms.common.internal.zzf is referenced as an interface fromcom.google.android.gms.internal.zzcku
.
原因:com.android.builder.dexing.DexArchiveBuilderException:无法处理Firebase-analytics-impl-11.8.0.aar \ jars \ classes.jar
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process Firebase-analytics-impl-11.8.0.aar\jars\classes.jar
build.gradle
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.xxxxxx.xxxx"
minSdkVersion 17
targetSdkVersion 28
versionCode 171312
versionName "1.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
project.archivesBaseName = "doctor"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
debug {
minifyEnabled false
proguardFiles fileTree(dir: "proguard", include: ["*.pro"]).asList().toArray()
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
}
flavorDimensions "environment"
productFlavors {
staging {
applicationIdSuffix ".staging"
}
production {
}
development {
applicationIdSuffix ".development"
}
}
dataBinding {
enabled = true
}
buildToolsVersion '28.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
ext {
retrofitVersion = '2.3.0'
firebaseVersion = '15.0.2'
}
dependencies {
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:design:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:support-v13:$rootProject.ext.supportLibVersion"
implementation "com.android.support:support-compat:${rootProject.ext.supportLibVersion}"
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation project(path: ':quickblox')
}
QuickBlox模块的build.gradle
build.gradle of QuickBlox module
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
flavorDimensions "default"
defaultPublishConfig "doctorDebug"
publishNonDefault true
productFlavors {
doctor {
buildConfigField "boolean", "IS_DOCTOR", "true"
versionNameSuffix "-doctor"
}
patient {
buildConfigField "boolean", "IS_DOCTOR", "false"
versionNameSuffix "-patient"
}
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':library')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.quickblox:quickblox-android-sdk-videochat-webrtc:3.8.1'
implementation 'com.facebook.fresco:fresco:1.8.1'
api('com.quickblox:quickblox-android-sdk-messages:3.8.1')
}
我已将此android.enableD8.desugaring = true
添加到gradle.properties
中.不过,我也面临着同样的问题.
I have added this android.enableD8.desugaring = true
in gradle.properties
. Still, I am facing the same issue.
有解决方案吗?
推荐答案
也请添加此依赖项
implementation 'com.google.firebase:firebase-core:16.0.7'
希望此问题将得到解决.
Hope this issue will be fixed.
这篇关于com.android.builder.dexing.DexArchiveBuilderException:异化时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!