Execution failed for task ':app:processDebugResources' after cleaning project

前端 未结 7 2315
有刺的猬
有刺的猬 2021-02-14 20:42

The error I\'ve been getting is this:

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task \':app:processDebugResource         


        
相关标签:
7条回答
  • 2021-02-14 20:54

    For me it was to update the compileSdkVersion and targetSdkVersion in build.gradle from 27 to 28.

    0 讨论(0)
  • 2021-02-14 20:56

    I had the same issue in my app because I wanted to merge with my workmate branch. I noticed the issue was with something related with xml resources so what worked for me was;

    • Download the zip project from Github with his branch

    • Unzip the project

    • Copy the entire drawable folder to my drawable folder

    • Avoid the double xml of course

    • Make & Rebuild Project

    0 讨论(0)
  • 2021-02-14 20:57

    Keyword is Resources from

    Execution failed for task ':app:processDebugResources'
    

    Therefore, the problem likely exists somewhere in an XML file.

    For instance, your manifest's application tag. I don't think that name attribute is valid. Plus, you already have android:name for a different class. Therefore remove the name one. Or change to android:name and keep only one. If you need both classes, then have AppController extend the BootstrapApplication class.

    <application
        name="com.example.bliss_000.todolistapp.AppController"
    

    Also, the entire package name isn't necessary.

    For example, the MainActivity can simply be

    <activity
         android:name=".MainActivity"
    
    0 讨论(0)
  • 2021-02-14 21:06

    90% possible your problem from xml files

    Check following things in your xml

    • Goto xml -> find (ctrl +f)-> search "@string/" -> check all strings are valid
    • do samething for "@drawable/" & "@color/"

    In my case I missed some drawables & colors and some strings not mapping

    String not mapping issue

    ex: "@string/password" "password" string available in my strings.xml but when I click (ctrl +click) not open in strings.xml

    I hardcode the not mapped strings.. problem fixed

    0 讨论(0)
  • 2021-02-14 21:06

    I found the issue why this is happening It because of XML file only

    Solution:

    In You project go to android folder-> app -> app -> src -> main -> res -> drawable -> launch_background.xml

    Their replace this Default Code inside of <''>

    item android:drawable="@android:color/white"
    

    Save and run the app

    0 讨论(0)
  • 2021-02-14 21:07

    This problem may caused from xml code content:

    1. Check activity_main.xml for all errors,
    2. Fix all errors than rebuild by going to menu->build than click on 'Rebuild Project'
    0 讨论(0)
提交回复
热议问题