Question

R.java is not responding. I made 4 layouts in res/layout and it took 3 layouts but not responding for 4th

If i edit the R.java will it stop regenerating the code ?

Was it helpful?

Solution

Check all of your resources for errors. Make sure there are no subfolders in your Drawable folders, make sure all resource names contain only lowercase letters, numbers, and underscores for their names, make sure any ninepatch images you're using are correct (use tools/draw9patch in your SDK folder). Clean your project after any changes to these.

If you can't find anything that looks out of place, start removing any resources you've added, removing the most recent first, and cleaning after each removal, and see if the problem goes away. If it goes away after pulling one out, then there's a problem with that resource.

OTHER TIPS

Project > Clean... This will force Eclipse to delete and regenerate the R.java file.

Just came across same problem. Delete

Import android.R;

This should fix the problem and have all references re validated.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top