“No resource identifier found for attribute 's

2020-01-26 06:55发布

I am attempting to update my android application to look better for tablets running Honeycomb. As such, I am targeting version 11 of the SDK (my minSdkVersion = 4). This adds the Honeycomb theme to my app, making it look better. However, I have no way to access my menu options. So, I am attempting to add my menu items as an action bar item with the following in the file in my /res/menu/ folder:

android:showAsAction="ifRoom|withText"

However, I get the following error:

No resource identifier found for attribute 'showAsAction' in package 'android'

I tried altering my minSdkVersion number to 11 to see if it would work, but no luck. Any ideas? Thanks!

8条回答
再贱就再见
2楼-- · 2020-01-26 07:37

Check your compileSdkVersion on app build.gradle. Set it to 21:

compileSdkVersion 21
查看更多
\"骚年 ilove
3楼-- · 2020-01-26 07:38

remove android:showAsAction="never" from res/menu folder from every xml file.

查看更多
登录 后发表回答