我有Android Studio Beta.我创建了一个新项目,编译我的旧模块,但是当我尝试启动应用程序时,它没有启动消息:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
Run Code Online (Sandbox Code Playgroud)
com.android.builder.dexing.DexArchiveMergerException:无法合并dex
但我不知道如何解决这个错误.我用谷歌搜索了几个小时但没有成功.
我的项目是:
// 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
}
Run Code Online (Sandbox Code Playgroud)
我的应用程序gradle:
apply plugin: 'com.android.application'
android …Run Code Online (Sandbox Code Playgroud) Error:java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Error:java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Error:com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Error:com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/integration/android/IntentResult;
Run Code Online (Sandbox Code Playgroud)