Android gradle build Error "completed with nonzero exit value 42", what does this mean and how to fix it?

I am trying to run an older project over what, in my opinion, is the latest version of Android studio. When I try to start or debug the application, I get 2 error messages. For me, Google hasn’t found a viable solution.

mistake 1

Error: error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command' E: \ Android Studio \ Android \ sdk \ build-tools \ 21.1.2 \ aapt. exe '' with non-zero output value 42

mistake 2

Error: execution completed for task ': app: mergeDebugResources'.

E: \ tuts \ Android Application Development {AM} \ Exercise Files \ Ex_Files_DevelopAndroidApp_EssT \ Ex_Files_DevelopAndroidApp_EssT \ Exercise Files \ Solutions \ 04_Layouts \ RegistrationSolution \ app \ build \ intermediates \ exploded-aar \ com.android.support \ 21comp.0-var .3 \ res \ drawable-mdpi \ abc_btn_switch_to_on_mtrl_00012.9.png: Error: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command' E: \ Android Studio \ Android \ sdk \ build-tools \ 21.1.2 \ aapt.exe '' completed with a non-zero output value of 42

What do the errors mean and how to fix them? here you can see the Android Studio

I tried to close and open, and android studio thinks this can help Image of Event Log

+4
source share
2 answers

Android Studio sometimes encounters this problem.

, jpg, jpeg .., , .

, - , , , , .

.

PNG JPG .

+1

google

/ , build.gradle

compile 'com.android.support:appcompat-v7:22.2.0'

0

All Articles