This morning when I opened up Eclipse to work on an Android project I got an error inside the R.java file.
I know what the error is, but I can't seem to grasp how to fix it ;\
The code where the error is:
public static final class string {
public static final int =0x7f040010;
public static final int app_name=0x7f040000;
As you can see, the first field doesn't have a name and that gives an error of course.
Problem is when I delete the file and it's auto generated again, the error is still there. If I try to manually change or delete the field it doesn't help. Still an error.
Tried to restart Eclipse - no difference. Tried to clean up the project and I've tried to "fix project properties" from the Android tools menu.
Anyone? It's really annoying as I can't continue with my project. I might have to delete the project and copy the classes, xml and drawables, but I'd rather not - hate doing cumbersome work :S
The problem is most likely with the strings.xml file. When you build the project that file is compiled into the R.java resources class. So check your strings.xml file carefully and as there is most likely an issue there that is causing this compilation error.
Most probably, u have an empty string in your strings.xml
<string name=""></string>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With