知道为什么 Eclipse 有时会出现毛躁并且无法识别它几秒钟前所做的代码吗?下面代码中的R"在 5 分钟前没有出现时下面有红色波浪线,我没有更改任何代码.这种情况在 Eclipse 中经常发生,通常我将其关闭并重新启动它,这很好......这次不去了.
Any ideas why at times Eclipse frizzles and doesn't recognize code it did seconds ago? The "R" in the code below has the red squiggle under it when it didn't 5 minutes ago and I've change no code. This happens frequently with Eclipse and usually I shut it down and start it again and it's good to go...no go this time.
// Initialize view elements
mSearchBox = (EditText) this.findViewById(R.id.edittext_search);
mSearchButton = (Button) this.findViewById(R.id.button_search);
听起来R类需要重新生成,尝试更改布局文件并保存,以便项目重新生成.
it sounds like the R class needs to be regenerated, try making a change to the layout file and saving it so the project rebuilds.
这篇关于Eclipse 无法识别“R.id..."与安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!