I’m new to Eclipse/Android development so I’m hoping this is something basic that I’m just doing wrong. Basically I’ve been playing around with developing Android apps and I was editing one earlier. I changed my main.xml file and when I went back to my class that runs the app all references to the “R” class were broken. I looked in the “gen” folder (Generated Java Files) and saw that the class was completely gone from the solution.
I had been debugging not 5 minutes before and didn’t have any problems doing so. The only things I had done since debugging were moving 2 files from the “drawable-hdpi” folder to the assets folder and I had edited the “main.xml” file.
I’ve tried cleaning the project and restarting Eclipse but neither of those ideas worked. Any suggestions?
Check your main.xml file. If there is a fault in it (invalid XML, wrong element name, etc), then the R.java file may not be generated properly and you will have broken references.
Also make sure that the XML file itself does not have broken references (to strings, colors, and other kinds of assets).
Re-examine properly all that has changed since the last time your application was working.