2014-05-12 69 views
0

我在这个项目中使用ActionBarSherlock和HoloEverywhere。 main.xml中是相当简单的,看起来像这样:Android - 自定义标签栏上ActionBarSherlock图标产生错误

<menu xmlns:android="http://schemas.android.com/apk/res/android" > 

<item 
    android:id="@+id/action_settings" 
    android:orderInCategory="100" 
    android:showAsAction="ifRoom|withText" 
    android:title="@string/action_info_settings" 
    android:icon="@android:drawable/ic_menu_customsettings"/> 

</menu> 

我在绘制-MDPI,绘制,华电国际,并绘制-xhdpi ic_menu_customsettings.png。我收到以下错误:

Error: No resource found that matches the given name (at 'icon' with value '@android:drawable/ic_menu_customsettings'). 

我应该做的事情比把PNG文件在这些文件夹,使他们通过动作条访问吗?

+0

你走你不需要做任何事情,更正确的步骤,你尝试过清理项目或重新启动Eclipse的? –

+0

是的。在清理完项目后,我得到了那个错误和9个更多的错误,都说“R不能解析为变量”。 – Anonymous1

+0

确保您的导入中没有R文件 –

回答

0

正确的路线是:

android:icon="@drawable/ic_menu_customsettings"/>