Error:java.util.concurrent.ExecutionException: AAPT2 error-ThrowExceptions

Exception or error:

How can I solve this problem, when I am building it, it is showing me the same problem-
java.util.concurrent.ExecutionException: AAPT2 error: check logs for details

I am using classpath ‘’

What should be the exact solution. Please let me know as soon as possible.

How to solve:

There could be a problem in your res folders it could be an image that was not well converted so the solution to this is to update your gradle plugin which will highlight the actual problem

This line classpath ''

Edit your build.gradle file:

 buildscript {
    repositories {
        google() // important!
    dependencies {
        classpath ''

allprojects {
    repositories {
        google() // important!

NOTE This might require to update your gradle to 4.6


I had the same issue. Apparently this line had to be at the top of the main XML file and was 2 or 3 lines below.

<?xml version="1.0" encoding="utf-8"?>

Cut and pasted to top of XML file and build succeeded.


  1. Open your build.gradle(app module)
  2. Please make sure you have buildToolsVersion available in your gradle file (if it is missing please make sure you have to add (buildToolsVersion) same version as of compileSdkVersion)


error: invalid file path 'F:\AK-Android-Code\ak-im\build\intermediates\manifests\aapt\enterpriseArmV7\release\output.json'.
error: invalid file path 'F:\AK-Android-Code\ak-im\build\intermediates\manifests\aapt\enterpriseArmV7\release\AndroidManifest.xml'.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ak-im:verifyEnterpriseArmV7ReleaseResources'.
> java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: AAPT2 error: check logs for details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at

65 actionable tasks: 6 executed, 59 up-to-date

In my case,error info as above.I delete file folder F:\AK-Android-Code\ak-im\build\intermediates\manifests\aapt\ then rebuild project and it is successful. You can use ‘gradlew –debug assembleRelease ’ check gradlew’s output info.


Error: java.util.concurrent.ExecutionException: AAPT2 error:
check logs for details

Solve it in the following way in the Gradle:

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'+

this line

    aaptOptions.cruncherEnabled = false
    aaptOptions.useNewCruncher = false


I have the same problem as you and solved this problem this way:

First, bulid a new “hello world” project in Android Studio and make sure it can correctly run.
Then, open the build.gradle file to check the classpath. In my “hello world” project, the classpath is

classpath ''

And then open the file to check the distributionUrl.In my “hello world” project, the distributionUrl is


Finally, make the two configurations the same as “hello world” project in the imported project. The app could run correctly .

Leave a Reply

Your email address will not be published. Required fields are marked *