resource error in android studio after update: No Resource Found

后端 未结 14 1117
别跟我提以往
别跟我提以往 2020-12-23 09:13

After a recent update to Android Studio, we\'re having problems getting a project to compile that previously worked. At first we were getting the following error:

         


        
相关标签:
14条回答
  • 2020-12-23 09:22

    You need to set compileSdkVersion to 23.

    Since API 23 Android removed the deprecated Apache Http packages, so if you use them for server requests, you'll need to add useLibrary 'org.apache.http.legacy' to build.gradle as stated in this link:

    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.0"
        ...
    
        //only if you use Apache packages
        useLibrary 'org.apache.http.legacy'
    }
    
    0 讨论(0)
  • 2020-12-23 09:22

    if u are getting errors even after downloading newest SDK and Android Studio I am a newbie: What i did was 1. Download the recent SDK (i was ) 2.Open file-Project structure (ctrl+alt+shift+S) 3. In modules select app 4.In properties tab..change compile sdk version to api 23 Android 6.0 marshmallow(latest)

    make sure compile adk versionand buildtools are of same version(23)

    Hope it helps someone so that he wont suffer like i did for these couple of days.

    0 讨论(0)
  • 2020-12-23 09:25

    compileSDK should match appCompat version. TargetSDK can still be 22 (e.g. in case you didn't update to the new permission model yet)

    0 讨论(0)
  • 2020-12-23 09:27

    Upgrade to use API 23 (Android 6.0) or change back the appcompat-v7 to 22.2.2 version in Gradle. This work for me when add google play service

    0 讨论(0)
  • Try to match all version:

    compileSdkVersion 23
    buildToolsVersion '23.0.0'
    targetSdkVersion 23
    compile 'com.android.support:appcompat-v7:23.0.0'
    

    It's work for me.

    0 讨论(0)
  • 2020-12-23 09:38

    if you have :

    /Users/james/Development/AndroidProjects/myapp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.0/res/values-v23/values-v23.xml
    Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
    Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
    

    error , you must change your appcompat , buildtools , sdk to 23 but , if you don't like to change it and must be in 22 do this :

    • compile 23
    • target 22
    0 讨论(0)
提交回复
热议问题