错误:任务':app:transformClassesWithDexForDebug'执行失败。
com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:com.android.dex.DexException:多个dex文件定义Lcom / google /机器人/克/ AUTH / API /登入/内部/ ZZG;
当我要构建APK时会显示此错误消息。 这是什么意思?我该如何解决?
这些是我的依赖项:
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.google.firebase:firebase-storage:10.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.sillebille:dynamic-calendar:1.0.1'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.firebaseui:firebase-ui:0.6.2'
testCompile 'junit:junit:4.12'
答案 0 :(得分:0)
将' com.firebaseui:firebase-ui:0.6.2' 更改为' com.firebaseui:firebase-ui:1.2.0&#39 ; 并添加编译' com.android.support:multidex:1.0.1'
app build.gradle
android {
defaultConfig {
// whats ever
multiDexEnabled true
}
}
// whats ever
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.google.firebase:firebase-storage:10.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.sillebille:dynamic-calendar:1.0.1'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.firebaseui:firebase-ui:1.2.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
}
并添加到您的项目build.gradle
中allprojects {
repositories {
// whats ever
maven { url 'https://maven.fabric.io/public' }
}
的AndroidManifest.xml
<application
android:name="android.support.multidex.MultiDexApplication"