AAPT2 Error Solution.
If your Android studio has been updated.
You may encounter an error in the studio, such as " AAPT Error 2: Check the log for details "
This error occurs when you have done something wrong in your XML file, for example, an invalid value, contents 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. This gives an error like AAPT2.
If you want to know where the real mistake is
Follow the step.
- Look at the panel to the right of your Android studio. Open the "Gradle" tab and click on it.
- You will see the option "application". Press here.
- In the application options you will see [Tasks β build], click on it.
- After that, you will get a list of options and see a double click on "AssemblyDebug".
- Be patient and look at the "Assembly" tab on the bottom panel of Android studios, there you will get a specific error.

source share