how to fix 23.0.1\aapt.exe'' finished with non-zero exit value 1

后端 未结 27 2998
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-06 16:18

All of a sudden I cannot get Gradle to build any projects under Android Studio.

Error:Execution failed for task \':app:processDebugResources\'. com

相关标签:
27条回答
  • 2020-12-06 16:44

    installing latest SDK/build-tool helps me.

    0 讨论(0)
  • 2020-12-06 16:44

    In my case, I backtracked everything that I implemented and found that the issue was in the xml layout file that I was using for my login screen.

    The relation that I had defined among the child views within the RelativeLayout(parent layout), was causing the error.

    So the way to avoid such errors in future is to keep running/checking the code as soon as you implement anything, to avoid long backtracking(which was in my case).

    Hope this would be of some help!

    0 讨论(0)
  • 2020-12-06 16:45

    First try to clean and rebuild your project from Build menu.

    Step 1: go to Build -> Clean Project

    Step 2: go to Build -> Rebuild Project

    This should solve your problem.

    Otherwise try updating Android SDK build tool from SDK manager and modify your build.gradle to use latest buildToolsVersion i.e "23.0.2" as of now

    0 讨论(0)
  • 2020-12-06 16:45

    this error happened when you delete any resource as image which is used in any file the android studio rise this error

    the solution

    Build -> clean project Build -> rebuild project

    good luck

    0 讨论(0)
  • 2020-12-06 16:45

    I spent nearly 12 hour to find the resolution to this issue and finally I found the resolution.

    This kind of supernatural issue, might happen in the below cases,

    1. When your code has some problem, like sometimes IntelliJ/AndroidStudio does not report the compilation errors. Open each class and check for any compilation issues, these compilations issues will be because of not able to resolve few dependencies.

    2. When you have a library that is latest, but you are referring to the oldest version.(Similar to point 1).

    3. When you have a library that is dependent on some other library and that in turn referencing to old library, but your direct library is referring to newer version.

    4. Importing from JFrog Artifactory, but your cache is not cleared, and you app is still holding to older version of .aar file

    5. Your current gradle version of the app is latest, but you imported some other project as library and that version is older.

    6. Your current gradle version of the app is latest, but you imported .aar file from jfrog artifactory and that is build from older gradle version.

    when you are trying all the above cases, clean and build, or if this doesn't work, try "invalidate cache and Restart".

    error like this will fall in some or the other above mentioned cases.

    Happy Coding..!

    0 讨论(0)
  • 2020-12-06 16:47

    If the error is occuring while Gradle Processes Resources, then it is most likely an issue with your resources. Check your gradle console to make sure.

    Double check any recent changes that you may have made to the res folder. In my case, I simply renamed a resource (banner.png to something_else_banner.png since banner.png must have been reserved), and it worked!

    Other things I tried that failed:

    • Based on the answer by mixel, i tried to pngcrush and optipng my png that lead my to beleive that it could be an issue with my resources since the Gradle Console showed that the error occured during :app:processDebugResources FAILED.
    • Build -> clean project Build -> rebuild project failed
    0 讨论(0)
提交回复
热议问题