Exception : AAPT2 error: check logs for details

前端 未结 23 1853
走了就别回头了
走了就别回头了 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:47

    I ran into this very issue today morning and found the solution for it too. This issue is created when you have messed up one of your .xml files. I'll suggest you go through them one by one and look for recent changes made. It might be caused by a silly mistake.

    In my case, I accidentally hardcoded a color string as #FFFFF(Bad practice, I know). As you can see it had 5 F instead of 6. It didn't show any warning but was the root of the same issue as encountered by you.

    Edit 1: Another thing you can do is to run assembleDebug in your gradle console. It will find the specific line for you.

    Edit 2: Adding an image for reference to run assembleDebug.

提交回复
热议问题