在Android Studio中构建apk时出现多个dex文件错误

时间:2017-09-03 07:54:10

标签: java android-studio firebase

GRADLE FILE IMAGE HERE .........和............. LOG IMAGE HERE

Android Studio中构建apk文件时出现以下错误:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/firebase/iid/zzb;

你知道可能是什么原因吗?

1 个答案:

答案 0 :(得分:0)

android {
     defaultConfig {
    ...
            minSdkVersion 
            targetSdkVersion 
            multiDexEnabled true <-- the line that matters
          }
...
}