Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error

前端 未结 6 2001
梦如初夏
梦如初夏 2020-12-05 18:10

How can I solve this problem, when I am building it, it is showing me the same problem- java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Ex

6条回答
  •  眼角桃花
    2020-12-05 19:01

    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 'com.android.tools.build:gradle:3.5.1'
    

    And then open the gradle-wrapper.properties file to check the distributionUrl.In my "hello world" project, the distributionUrl is

    distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
    

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

提交回复
热议问题