Eclipse not Recognizing quot;R.id...quot; with Android(Eclipse 无法识别“R.id...与安卓)
问题描述
知道为什么 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..."与安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Eclipse 无法识别“R.id..."与安卓


基础教程推荐
- 如何从 logcat 中删除旧数据? 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01