无法在Android Studio中找到样式"listMenuViewStyle" [英] Failed to find style 'listMenuViewStyle' in Android Studio
本文介绍了无法在Android Studio中找到样式"listMenuViewStyle"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将图标添加到我的android应用程序中的菜单项.但是,Android Studio中的布局预览窗口显示错误:
I'm trying to add icons to my menu items in my android application. However the layout preview window in Android studio is displaying the error:
Failed to find style 'listMenuViewStyle' in current theme
我正在使用Holo.Light主题,并且尝试了其他一些运气不好的主题.我的布局xml如下:
I'm using the Holo.Light theme, and have tried a number of other themes with no luck. My layout xml is as follows:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.me.myApp.activities.StartActivity" >
<item android:id="@+id/action_settings"
android:title="@string/menu_section_settings"
android:icon="@drawable/ic_settings"
android:showAsAction="never" />
<item android:id="@+id/action_about"
android:title="@string/menu_section_about"
android:icon="@drawable/ic_help"
android:showAsAction="never" />
</menu>
我在这里想念什么?谢谢!
What am I missing here? Thanks!
推荐答案
The attribute listMenuViewStyle
was introduced with api level 24. Make sure you use compileSdkVersion 24
or above.
这篇关于无法在Android Studio中找到样式"listMenuViewStyle"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文