3個錯誤non-zero exit value 1; non-zero exit value 2; non-zero exit value 3java
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.android
com.Android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'F:\Program Files (x86)\Java\jdk1.8.0_31\bin\java.exe'' finished with non-zero exit value 1api
這個是由於依賴包重複了 (像v4和v7),如圖。app中實現了對v7的依賴,可是app和v7都添加了對v4包的依賴。因此就報這個錯誤,修改以後再報,就clean,rebuild一下app
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.ide
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'F:\Program Files (x86)\Java\jdk1.8.0_31\bin\java.exe'' finished withnon-zero exit value 2gradle
這個錯誤在app的build.gradle裏面添加下面這句就行了。ui
android {code
defaultConfig { ... multiDexEnabled true }
}orm
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.圖片
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'F:\Program Files (x86)\Java\jdk1.8.0_31\bin\java.exe'' finished withnon-zero exit value 3
這個錯誤就在app.bulid裏面加上這句,再rebuild ,以後再運行就好了。4g能夠看電腦配置修改(2g,3g,6g,8g)。
android { **** dexOptions { javaMaxHeapSize "4g" } }