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..."与安卓


- Android - 拆分 Drawable 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01