昨天我正在研究我的android应用程序,它运行良好。但是今天当我打开它,我得到错误R cannot be resolved to a variable
,我不知道为什么会发生这种情况。在控制台中,我得到这个错误[2014-03-29 11:04:59 - RockPaperScissors] C:\Users\hosfo_000\workspace2\RockPaperScissors\res\menu\main.xml:6: error: Error: No resource found that matches the given name (at 'title' with value '@string/action_settings').
有没有人有任何想法可能会导致此?我已经尝试清理该项目,但没有奏效。android devleopment R无法解析为变量(没有资源发现错误)
编辑
6号线我的main.xml的是<item
所以我加了该项目的其余部分。我的整个main.xml包含这个项目。
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="@string/action_settings"
app:showAsAction="never"/>
您是否使用了正确的R?检查以确保你没有使用android.R – Rarw