Sajith
Sajith

Reputation: 311

Android No resource found that matches given name Error

I have set my app's min Sdk version to jelly bean. (created for kit kat) after that this error occurred.
Android Studio : No resource found that matches the given name: attr 'android:actionModeShareDrawable'

how can I solve this ?

Upvotes: 2

Views: 532

Answers (1)

Rajesh Jadav
Rajesh Jadav

Reputation: 12861

From Error

No resource found that matches the given name: attr 'android:actionModeShareDrawable'

The issue is about compling application with lower target.

AppCompat v21 builds themes that require the new APIs provided in API 21 (Android 5.0). To compile your application with AppCompat, you must also compile against API 21. The recommended setup for compiling/building with API 21 is a compileSdkVersion of 21 and a buildToolsVersion of 21.0.1 (which is the highest at this time - you always want to use the latest build tools).

Make sure the value for target (which tells the target android version) in project.properties file of both your project folder and appcompat_v7 folder is same

: inside 'your_project'/project.properties

 target=android-21
android.library.reference.1=../appcompat_v7

and

: inside appcompat_v7/project.properties

target=android-21
android.library=true

and after this don't forget to clean your project .

Hope it helps!

Upvotes: 2

Related Questions