gpt4 book ai didi

java - 错误 java.lang.RuntimeException : java. lang.RuntimeException : com. android.builder.dexing.DexArchiveMergerException:无法合并 dex

转载 作者:行者123 更新时间:2023-11-30 10:20:20 27 4
gpt4 key购买 nike

我的项目在 Android Studio 3.0.1 上的 Whatchap 中,这是我的设计 gradle。build.gradle(应用程序) 应用插件:'com.android.application'

android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
compileSdkVersion 26
defaultConfig {
applicationId "stmik.iax.whatchap"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '26.0.2'
productFlavors {
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
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'
implementation files('libs/sun.misc.BASE64Decoder.jar')
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.android.gms:play-services-gcm:11.2.0'
}

模块 Gradle

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'


}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

这是我的问题

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

我已经尝试过了1.清洁项目2.重建项目添加 multiDexEnabled true

它不能解决我的问题

最佳答案

java.lang.RuntimeException: java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException: Unable to mergedex

您应该升级 gms:play-service 版本。

   implementation 'com.google.android.gms:play-services:11.4.0'

之后,Clean-Rebuild-Run

仅供引用

检查 gms:play-services 版本。阅读Release Notes .

关于java - 错误 java.lang.RuntimeException : java. lang.RuntimeException : com. android.builder.dexing.DexArchiveMergerException:无法合并 dex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48262567/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com