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

前端 未结 7 2517
一个人的身影
一个人的身影 2021-02-14 20:32

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:55

    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)
  • 2021-02-14 21:01

    I'll add on that to check EVERY .xml file. This includes your AndroidManifest.xml file. Most errors can also be subtle, too. For example, this piece of code was causing the error: android:fullBackupContent="". In case if you can't find the error, try using gradlew build --stacktrace, as it gives a full stacktrace, allowing for you to trace the error.

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

    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:03

    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 21:12

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

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

    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)
提交回复
热议问题