無法合并Dex我有安卓工作室Beta。我創(chuàng)建了一個(gè)新項(xiàng)目,編譯了我的舊模塊,但是當(dāng)我嘗試啟動(dòng)應(yīng)用程序時(shí),它沒有帶著消息啟動(dòng):Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.com.android.builder.dexing.DexArchiveMergerException:無法合并dex但我不知道怎么解決這個(gè)錯(cuò)誤。我在谷歌上搜索了幾個(gè)小時(shí),但沒有成功。我的項(xiàng)目分級(jí): // Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta6'
classpath "io.realm:realm-gradle-plugin:3.7.1"
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}}allprojects {
repositories {
jcenter()
google()
}}task clean(type: Delete) {
delete rootProject.buildDir}我的應(yīng)用程序Gradle: apply plugin: 'com.android.application'android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "parad0x.sk.onlyforyou"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
}
}
compileOptions {
targetCompatibility 1.7
sourceCompatibility 1.7
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
lintOptions {
checkReleaseBuilds false
}當(dāng)我沒有導(dǎo)入第二個(gè)模塊(解析器)時(shí),應(yīng)用程序沒有在Dex上崩潰,但是當(dāng)模塊沒有被導(dǎo)入時(shí),應(yīng)用程序就不能工作了。*D:d
3 回答

DIEA
TA貢獻(xiàn)1820條經(jīng)驗(yàn) 獲得超2個(gè)贊
com.google.android.gms:play-services:11.2.2
com.google.android.gms:play-services:11.4.0
打掃,清除 重建

慕尼黑8549860
TA貢獻(xiàn)1818條經(jīng)驗(yàn) 獲得超11個(gè)贊
APP/build.gradle:
android { defaultConfig { multiDexEnabled true }}
- 3 回答
- 0 關(guān)注
- 567 瀏覽
添加回答
舉報(bào)
0/150
提交
取消