appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable'

后端 未结 14 2091
不思量自难忘°
不思量自难忘° 2020-11-22 05:03

When attempting to use the latest appcompat-v7 support library in my project, I get the following error:

/Users/greg/dev/mobile/android_project/app/build/int         


        
14条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 05:28

    I got the same error when I changed the Compile SDK version from API:21 to API:16. The problem was, appcompat version. If you need to use an older version of android API, so you have to change this appcompat version also. In my case (for API:16), I had to use appcompat-v7:19.+.

    So I replace dependencies in build.gradle as follows,

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:19.+'
    }
    

    And make sure you have older versions of appcompat versions on your SDK enter image description here

提交回复
热议问题