2

R file is auto generated but by mistake i have deleted it , how to regenerate it ? Is it possible to me to add contents in it?

3
  • 1
    This should be tagged with android and not tagged with r. The r tag refers to the programming language, not a file extension. Commented Dec 15, 2011 at 5:09
  • Go to --> Project --> check Build Automatically and Refresh Project. Commented Dec 15, 2011 at 5:27
  • 1
    If any xml has an error, the R file is not generated back. Commented Dec 15, 2011 at 7:12

3 Answers 3

4

Just fix the errors that are stopping the R file from being generated (this is usually a naming issue with xml resource files for me, remember to not use caps in the xml file names), and then clean and build your project.

Also you should never add contents to the R file. Just add what you need in source and resources files and let it auto generate itself.

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

Comments

0

what to do if R.Java file is deleted after clean project ?

Go to --> Project --> clean project

1 Comment

sometimes this doesn't help, because there are errors in files that contribute to project resources
0

R file does not allow you to edit or enter your own details is auto generated file.

Comments

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.