Error : should use android:showAsAction when not using support library
2016-11-03 15:17
585 查看
我有一个ListActivity,然后一个menu/options.xml
android:showAsAction报错:
should use android:showAsAction when not using support library
参考了这个:http://www.cnblogs.com/liaojie970/p/5718901.html
ListActivity继承自Activity,不应该啊
又参考这个:
http://stackoverflow.com/questions/27443363/error-should-use-androidshowasaction-when-not-using-support-library
解决办法:
AndroidStudio->Open Module Settings->Dependencies->删除AppCompat相关的东西
android:showAsAction报错:
should use android:showAsAction when not using support library
1 <?xml version="1.0" encoding="utf-8"?> 2 <menu xmlns:android="http://schemas.android.com/apk/res/android"> 3 <item android:id="@+id/add" 4 android:title="Add" 5 android:icon="@drawable/ic_menu_add" 6 android:actionLayout="@layout/add" 7 android:showAsAction="ifRoom"/> 8 <item android:id="@+id/reset" 9 android:title="Reset" 10 android:icon="@drawable/ic_menu_refresh" 11 android:showAsAction="ifRoom|withText"/> 12 <item android:id="@+id/about" 13 android:title="About" 14 android:icon="@drawable/ic_menu_info_details" /> 15 </menu>
参考了这个:http://www.cnblogs.com/liaojie970/p/5718901.html
ListActivity继承自Activity,不应该啊
又参考这个:
http://stackoverflow.com/questions/27443363/error-should-use-androidshowasaction-when-not-using-support-library
解决办法:
AndroidStudio->Open Module Settings->Dependencies->删除AppCompat相关的东西
相关文章推荐
- when not using the appcompat library, you should be using the android:showAsAction attribute.
- 完美解决 use app:showAsAction when not using the appcompat library
- Android添加依赖出现This support library should not use a different version (26) than the compile(25).
- You receive a "Setup Library wbemupgd.dll could not be loaded" error message when you use Add or Remove Programs in Windows Server 2003
- Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: Got error: 1449: The user specified as a definer ('fk_system'@'localhost') does not exist when using LOCK TABLES
- 在给mysql数据库备份时,报错: mysqldump: Got error: 145: Table '.\shengdaxcom\pre_forum_thread' is marked as c rashed and should be repaired when using LOCK TABLES
- 导出Mysql数据库出错:Got error: 145: Table 'wp_options' is marked as crashed and should be repaired when using LOCK TABLES的解决方法
- Android Studio 使用教程(十五)之 This support library should not use a different version(x)than the compileS
- 【完美解决系列】This support library should not use a different version
- 关于This support library should not use a different version than the compilesdkversion
- This support library should not use a different version
- Got error: 1449: The user specified as a definer ('root'@'%') does not exist when using LOCK TAB
- This support library should not use a different version (25) than the compileSdkVersion
- This support library should not use a different version (24) than the compileSdkVersion (23)...
- This support library should not use a different version(x)than the compileSdkVersion(y)
- action button" android:showAsAction" not work
- android:showAsAction
- No resource identifier found for attribute 'showAsAction' in package 'android'
- 解决aapt.exe停止工作(No resource identifier found for attribute 'showAsAction' in package 'android')
- Android 'showAsAction' in package 'android'错误解决