0

Help, my project's completely broke!!!

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" is unrecognised

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

Tickled Pink
  • 969
  • 2
  • 14
  • 26
  • 1
    check if you have errors inside the res folder – Blackbelt May 17 '13 at 14:14
  • My layout reports it cannot find @string/button_text. I've renamed "button_text1" to "button_text" and it's still not found. I can select button_text1 and 2 from the .xml editor, regardless of how I change the strings.xml file. It's like the strings file isn't being linked to properly. – Tickled Pink May 17 '13 at 14:16
  • Original question answered here : http://stackoverflow.com/questions/16608524/eclipse-giving-error-missing-r-java-file-after-recent-update – Tickled Pink May 17 '13 at 14:28

1 Answers1

4

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

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. enter image description here After installing this, clean your projects and rebuild.

Community
  • 1
  • 1
Krauxe
  • 6,058
  • 2
  • 24
  • 22