如何修复破碎的项目中,R.不再认可? [英] how to fix broken project where R. no longer recognised?

查看:102
本文介绍了如何修复破碎的项目中,R.不再认可?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助,我的项目的彻底爆发!

Help, my project's completely broke!!!

我编码在Eclipse的Andr​​oid应用程序。我只是做了一个变化的字符串文件,替换现有的命名字符串(BUTTON_TEXT),以两个字符串(button_text1,button_text2)。该.xml编辑器将不承认换到字符串文件(是的,我没有保存;)),只有presentingBUTTON_TEXT。我试图清洁工程因为这是帮助修复图像不更新,没有工作。然后我试图机器人工具>修复项目属性。我现在可以在按钮标签更改为新的button_text1,但该项目将无法生成。资源不被识别。如:

I'm coding an Android app in Eclipse. I just made a change to the Strings file, replacing an existing named string ("button_text") to two strings ("button_text1", "button_text2"). The .xml editor would not recognise the change to the strings file (yes, I did save it ;)), only presenting "button_text". I tried "clean project" as that's helped fix images not updating, which did not work. I then tried Android tools > fix Project Properties. I can now change the button label to the new "button_text1" but the project won't build. Resources are not recognised. eg.

    setContentView(R.layout.layout_tables);

R是无法识别的。

"R" is unrecognised

我的整个项目被打破。什么是我需要做修复它?我在最新的Eclipse作为更新昨天。

My entire project is broken. What do I need to do to fix it? I'm in the latest Eclipse as updated yesterday.

推荐答案

如果你刚刚更新到Android SDK转。 22,您可能会遇到同样的问题问<一href="http://stackoverflow.com/questions/16608524/eclipse-giving-error-missing-r-java-file-after-recent-update">here.如果是这样的话:

If you have just updated to Android SDK rev. 22, you may be experiencing the same problem asked here. If that's the case:

更新到SDK工具后转速。在第一次22,你可以   需要再次重新启动的Andr​​oid SDK管理器并安装一个新项目:    Android SDK中内建工具。      安装此之后,清理你的项目和重建家园。

After updating to SDK Tools to rev. 22 for the first time, you may need to relaunch Android SDK Manager again and install a new item: Android SDK Build-tools. After installing this, clean your projects and rebuild.

这篇关于如何修复破碎的项目中,R.不再认可?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆