Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R.java file not generated automatically Eclipse [duplicate]

Possible Duplicate:
Developing for Android in Eclipse: R.java not generating

enter image description hereI cleaned my project and changed my project files name.I am getting "R cannot be resolved to a variable".When i clean the project nothing happens and my /gen/ folder is still empty.I was trying to show u guys an image of the situation but unfortunately i cant due to my low reputation. I hope this can be helpful.

like image 209
Mj1992 Avatar asked Mar 21 '12 18:03

Mj1992


3 Answers

Typically if the R .* can not be generate means that you have some issue into the res/ folder. Check for errors in res/ folder.

Invalid file name: must contain only [a-z0-9_.]

all the res/* filename should be named with lowercase character, underscore and number between 0 and 9

like image 71
Blackbelt Avatar answered Oct 22 '22 15:10

Blackbelt


The problem is that your layout files contain uppercase letters, which is prohibited. You can use only lowercase letters and the "_" symbol (not sure about numbers). Change the filenames and clean your project. Hope this helps.

like image 37
Egor Avatar answered Oct 22 '22 14:10

Egor


Did you rename your Application Package? To do that, right-click your prject in the "Package Explorer" and expand "Android Tools" then click "Rename Application Package".

like image 34
davehale23 Avatar answered Oct 22 '22 15:10

davehale23