Three errors: non zero exit value 1; non zero exit value 2; non zero exit value 3
Note that the dependent package, library dependent package and LIBS package should not be repeated
1.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 with non-zero exit value 1
This is because the dependency packages are duplicated (like V4 and nineoldandroids), as shown in the figure. The dependency on easeui is implemented in app, but the dependency on this package is added to both app and library files. So report this error, modify it and report it again, just clean and rebuild it
2.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 2
This error is in the app’s build.Gradle Just add the following sentence to it.
android {
defaultConfig {
...
multiDexEnabled true
}
}
3.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
This error is added to the app.bulid, and then rebuild, and then run it again. 4g can be modified depending on the computer configuration (2g, 3g, 6g, 8g).
dexOptions {
javaMaxHeapSize "4g"
}
Read More:
- Perfect solution Error:Execution failed for task ‘: APP:transformClassesWithDexForDebug ‘… Problem
- Execution failed for task ‘:app:mergeDebugResources’.
- Execution failed for task ‘:app:processDebugManifest’.
- Execution failed for task ‘:app:stripDebugDebugSymbols‘.
- To solve the execution failed for task ‘: app:transformDexArchiveWithDexMergerForDebug ‘
- Execution failed for task ‘:app:processDebugManifest’
- Error:Execution failed for task’:app:processDebugResources’. Personally resolved
- Error:Execution failed for task ‘: app:transformDexArchiveWithExternalLibsDexMergerForDebug The solution
- Quick solution org.gradle.api . tasks.TaskExecutionException : Execution failed for task ‘: app:compileJava ‘
- Execution failed for task ‘:app:installDebug’.
- Android: How to Solve Execution failed for task ‘:app:compileDebugJavaWithJavac‘. > javax/xml/bind/JAXBException
- Error code 1 error resolution (NPX create react app my app execution reports an error)
- Execution failed for task :Test:lintVitalRelease/Lint found fatal errors while assembling a release
- Hive execution task report cannot find main class error
- DB2 timed task execution stored procedure cannot complete scheduler thread’s initialization
- Failed to capture snapshot of output files for task ‘ :packagePreDebug’ property ”outputDirectory’
- Mobile development: the error of “task failed with exit 1 signal 0 {…”