[android] finished with non zero exit value

I have faced the same error while compiling. I tried all the methods here but failed only one thing worked but it takes a lot of time. by running this code on CMD to debug my app and shows me the missing tag in my XML layout.

gradle processDebugResources --debug

The best approach is to analyze the error not just ignoring it.

To run this code I installed Java JDK and then set Environment Variable: for JAVA_HOME and Gradle.

for gradle

C:\Program Files\Android\Android Studio\gradle\gradle-4.6\bin

for java

JAVA_HOME=C:\Program Files\Java\jre1.8.0_191