Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/201.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 构建APK时会弹出一个错误_Java_Android_Android Studio_Apk - Fatal编程技术网

Java 构建APK时会弹出一个错误

Java 构建APK时会弹出一个错误,java,android,android-studio,apk,Java,Android,Android Studio,Apk,错误:任务“: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/android/gms/

错误:任务“: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/android/gms/auth/api/signin/internal/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'

'com.firebaseui:firebaseui:0.6.2'更改为'com.firebaseui:firebaseui:1.2.0',并添加编译'com.android.support:multidex:1.0.1'

应用程序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'
}
allprojects {
    repositories {
    // whats ever
    maven { url 'https://maven.fabric.io/public' }
}
并添加到您的项目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'
}
allprojects {
    repositories {
    // whats ever
    maven { url 'https://maven.fabric.io/public' }
}
AndroidManifest.xml

<application
    android:name="android.support.multidex.MultiDexApplication"

您有很多libs。看这个医生@Ludy Astra Germany我做了,仍然没有工作。你知道这还能是什么吗?