Error retrieving parent for item - Android Studio

前端 未结 5 1948
无人及你
无人及你 2020-12-14 06:19

After downloading the New L SDK and 20 SDK when trying to refresh, build, or clean my project i get a

Error:Error retrieving parent for item: No resource fou         


        
相关标签:
5条回答
  • 2020-12-14 06:59

    Turns out that I had to make the target and compile version to L which meant that I could not run my app on older SDKs. If you want your app to run on SDK 19 and lower you have to set your compile and target version to 19 and your min SDK to whatever version you need.

    Next you have to adjust your imports to the version that is compatible with the SDKs that you have chosen to compile for. For example if you want to use the v7 support library on sdk 19 you must import it like this: compile compile 'com.android.support:appcompat-v7:20.+'

    0 讨论(0)
  • 2020-12-14 07:04

    just try this:

        android {
            compileSdkVersion 20
            buildToolsVersion '19.1.0'
    
            defaultConfig {
                minSdkVersion 14
                targetSdkVersion 20
            }
        }
        dependencies {
            compile 'com.android.support:appcompat-v7:19.+'
        }
    

    and if you have another module in your project, check manifest files in those modules too.

    0 讨论(0)
  • 2020-12-14 07:10

    In Android Studio, nothing above worked unless I compiled and targeted the same version (23 in this case...) and added the specific Google reference to compile Google APIs. which fixed all 99 errors after importing and updating from Eclipse:

    compileSdkVersion 'Google Inc.:Google APIs:23'

    0 讨论(0)
  • 2020-12-14 07:15

    If you get similar errors in Eclipse when trying to use compatibility libraries with resources (for example: v7 support library) then:
    Right-click the library project folder (for example: android-support-v7-appcompat)
    Select Properties
    In the category panel on the left side of the dialog, select Android
    In the Project Build Target check the same platform version as in your project

    0 讨论(0)
  • 2020-12-14 07:19

    Just set your compileVersion to 19 and make sure you are not using the latest compatibility libraries (stick to version 19.1.0). That does the trick for me.

    0 讨论(0)
提交回复
热议问题