Task :processDebugResources Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt
at com.android.builder.core.AndroidBui
I was also getting same error because of using &
character directly in layout xml.
So, please be careful about using html entities in your project.
This resolved the issue for me... Build|Clean project Refactor|Remove unused resources I am still a beginner at this so I cannot explain why this might have worked. It was an arbitrary choice on my part; it was simple, did not require detailed changes and I just thought it might help :)
Just add this line as per your compileSdkVersion
buildToolsVersion "27.0.3"
I tried every possible solution to fix this frustrating error and only below worked for me. In your build.gradle add this:
android {
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false }
Ensure if no image in drawable folder is corrupted.
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 then
- Look at the panel which is at the right of your Android studio Check out the "Gradle" tab and click on it.
- You will see the "app" option. Click on it.
- In the app options you will see [Tasks -> build] click on it.
- Then you will get options list and see "assembleDebug" double click on it.
- Keep the patience and See build tab at the bottom panel of Android studios, you will get an exact error there what you made a mistake in which file and which position.