Error:Execution failed for task ':app:transformClassesWithDexForDebug'

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.ide.common.process.ProcessException: **

Error while executing java process with main class com.android.dx.command.Main with arguments {–dex –num-threads=4 –multi-dex –main-dex-list E:\myProject\QLJSProject\BJ-RuralSewageTreatment

在app的gradler配置文件中,添加 multiDexEnabled true 开启分包,然后添加

dexOptions {
    javaMaxHeapSize "4g"
}

**
defaultConfig {
applicationId “xxxxxx”
minSdkVersion 17
targetSdkVersion 22
versionCode 1
versionName “1.0”
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize “4g”
}

猜你喜欢

转载自blog.csdn.net/qq_34702058/article/details/80107254