Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

后端 未结 30 1486
野的像风
野的像风 2020-11-22 12:51

This is the output of my Gradle console, I am unable to build my project

D:\\Android Projects\\....\\app\\src\\main\\res\\layout\\topic_view_header.xml
Error         


        
30条回答
  •  渐次进展
    2020-11-22 13:30

    Check and try below things. Issue should be resolved.

    1. First of all check your log from bottom of the build window whether any error related to project showing or not. If error showing then fix all of those. Now build and run again fix all of the error comes up. It will eliminate aapt2 issue without changing android gradle plugin to 3.2.0.

    2. Secondly if there is not any project related error showing in the build log but still showing aapt2 error then you can fix it by following below steps.

    Update your android gradle plugin in your project level build.gradle file like below:

    classpath 'com.android.tools.build:gradle:3.2.0-alpha13'
    

    Now update android.enableAapt2=true. Then check and build your project.

    Any of these steps should work to fix aapt related issues.

提交回复
热议问题