Good day.
I'm having an error with my android application. I can't delete the codes because the R.java is auto generated by eclipse.
Whenever i delete it, it restores the error. I need help. Here's the code that has the error.
public static final class id {
public static final int 10_00=0x7f080021;
public static final int 90=0x7f08001f;
-
1what's the error exactly you have? the logcat may help you determine that the error is. R.java is design to be generated automatically. That's not a problem.Huang– Huang2012年02月09日 06:12:50 +00:00Commented Feb 9, 2012 at 6:12
-
Clean and rebuild your project, it will automatically solved. project -> clean and project -> buildPankaj Kumar– Pankaj Kumar2012年02月09日 06:12:58 +00:00Commented Feb 9, 2012 at 6:12
-
Better you know that R file is auto generated file. And are you sure that there are variable with names 10_00 and 90?Paresh Mayani– Paresh Mayani2012年02月09日 06:13:31 +00:00Commented Feb 9, 2012 at 6:13
-
Normally, we won't edit anything inside R.java manuallyApril Smith– April Smith2012年02月09日 06:13:46 +00:00Commented Feb 9, 2012 at 6:13
-
try built path . You should not update R.java.Dhruvisha– Dhruvisha2012年02月09日 06:13:53 +00:00Commented Feb 9, 2012 at 6:13
3 Answers 3
I think you don't know how to give variable names for resources or IDs in Android XML file.
The variable name should not start with number. It must start with alphabet. It should not contain any special characters which were used as tokens in XML file. (e.g., @, <,>, ?, etc.)
Valid : s12, hi, var_12, etc.
Invalid : 12s, 123, hi, s12#, etc.
The problem in your project is your ID names started with numbers as 10_00 and 90. Modify these to valid variable names.
I hope you understand this.
Comments
Variable name cannot be started with number. Search for java code convention.
Comments
or if it is showing error in specific file, resolve accordingly. If error is not displaying on specific files but on project, see Problems view in eclipse, and see the error and proceed accordingly. If Still, you are not able to resolve, put your issue.