Execution failed for task ':app:processDebugResources' even with latest build tools

前端 未结 10 1891
南笙
南笙 2020-12-03 05:14

I am getting this error when I try to run my project. I have installed the latest build tools- 23.0.3 but still the error persists. How do I fix this?

Execut         


        
相关标签:
10条回答
  • 2020-12-03 05:36

    Set your compileSdkVersion to 23 in your module's build.gradle file.

    0 讨论(0)
  • 2020-12-03 05:36

    Issue SOLVED by making library and app build.gradle same ... compileSdkVersion and buildToolsVersion.

    library build.gradle and

    android {
    
        compileSdkVersion 25
        buildToolsVersion "25.0.0"
        .....
        .....
    }
    

    app build.gradle

    android {
    
        compileSdkVersion 25
        buildToolsVersion "25.0.0"
        .....
        .....
    }
    
    0 讨论(0)
  • 2020-12-03 05:38

    as a quick fix to this question, make sure your compile Sdk verion, your buildtoolsversion, your appcompat, and finally your support library are all running on the same sdk version, for further clarity take a look at the image i just uploaded. Cheers. Follow the red annotations and get rid of that trouble.

    0 讨论(0)
  • 2020-12-03 05:42

    I want to add that sometimes android studio loses track of the resources file and can't build on launch. If the above answers are to no avail, try

    Build => Rebuild Project
    

    I lost many hours to this when I was a beginner at Android Studio.

    0 讨论(0)
  • 2020-12-03 05:44

    Another possible reason

    resConfigs "hdpi", "xhdpi", "xxhdpi", "xxxhdpi"
    

    can be source of this issue

    0 讨论(0)
  • 2020-12-03 05:49

    I stucked for two days and finally found my solution. I changed the compileSdkVersion to 27 (same with buildToolsVersion)

    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    
    0 讨论(0)
提交回复
热议问题