Exception : AAPT2 error: check logs for details

前端 未结 23 1577
走了就别回头了
走了就别回头了 2020-11-27 14:00
Task :processDebugResources Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt
    at com.android.builder.core.AndroidBui         


        
相关标签:
23条回答
  • 2020-11-27 14:57

    possible issue related to this can be with your XML files. I have faced this when I deleted my unnecery xml files.

    For remedy from this error in gradle.properties of the module, add this below line:

    android.enableAapt2=false
    

    after adding this line, restart the gradle.

    and do once clean, rebuild your project.

    0 讨论(0)
  • 2020-11-27 14:58

    I made a stupid mistake. In my case, I made the project path too deep. Like this: C:\Users\Administrator\Desktop\Intsig_Android_BCRSDK_AndAS_V1.11.18_20180719\Intsig_Android_BCRScanSDK_AndAS_V1.10.1.20180711\project\as\AS_BcrScanCallerSvn2

    Please migrate the project to the correct workspace. Hope this helps someone in future.

    0 讨论(0)
  • 2020-11-27 14:58

    If you are getting this error only when you are generating signed Apk . Then the problem might be in one or more of the imported media file format. I have used an image directly from net to studio and was not able to generate sign apk, then found the error .

    from Gradle >assembleRelease then got the error in console. see the error log in console image.

    0 讨论(0)
  • 2020-11-27 14:59

    Check the latest edited XML file. It is the main Villian I had once such error, I then checked the last xml file, ther was a line like android:layout_marginTop="." I changed it to android:layout_marginTop="16dp". That fixed the bug!

    0 讨论(0)
  • 2020-11-27 14:59

    style="?android:attr/android:progressBarStyleSmall"

    to

    style="?android:attr/progressBarStyleSmall"

    0 讨论(0)
提交回复
热议问题