0

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;
10
  • 1
    what'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. Commented Feb 9, 2012 at 6:12
  • Clean and rebuild your project, it will automatically solved. project -> clean and project -> build Commented 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? Commented Feb 9, 2012 at 6:13
  • Normally, we won't edit anything inside R.java manually Commented Feb 9, 2012 at 6:13
  • try built path . You should not update R.java. Commented Feb 9, 2012 at 6:13

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

Variable name cannot be started with number. Search for java code convention.

Comments

0

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.

1 Comment

I'v fixed the problem. There are some textview with with ID of 10_100 and 90. I renamed it and the problem goes away. Thank you so much

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.