6
votes

Error:Execution failed for task ':app:mergeDebugResources'.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

3

3 Answers

1
votes

It will happen, if your one of paths contains non-ASCII or ' ' (space) character. Try to change your service directory path to: C:/Users/Public/.gradle in Settings->Build, Execution, Deployment->Gradle

0
votes

AAPT2 Error solution.

If your Android studio has been updated.

Maybe, you would face an error in the studio like "AAPT 2 error: check the log for details"

This error will occur when you have done something wrong in your .xml file such as incorrect value, content not found, etc.

But, At that time you will not have the error specification there. Because the new version of Android Studio does not give you a specific error. It gives like AAPT2 error.

If you want to know where the actual error is

Follow step.

  1. Look at the panel which is at the right of your Android studio Check out the "Gradle" tab and click on it.
  2. You will see the "app" option. Click on it.
  3. In the app options you will see [Tasks -> build] click on it.
  4. Then you will get options list and see "assembleDebug" double click on it.
  5. Keep the patience and See build tab at the bottom panel of Android studios, you will get a specific error there.

enter image description here

0
votes

If you're in Ionic, there might be missing configurations from config.xml to your android platform. In my case was xmlns:android="http://schemas.android.com/apk/res/android" missing in app/src/main/res/xml/config.xml and in AndroidManifest.xml