Resource IDs not generating in


As mentioned in Listing 1.6 ,I have added IDs in activity_quiz.xml but same is not getting reflected in as shown in Listing 1.7 .What am I missing?I tried to clean up using Project>Clean but it also did not help.



Verify that all of your activity_quiz.xml and is correct. shift-ctrl-o on to ensure that your imports are correct. If all else fails, do a clean which will remove the gen directory. The directory will be rebuilt again.

I’ve had this issue when I misspell something in my .xml files which then causes and error. Make sure all errors are resolved.


Maybe its too late, but I will post my answer for other people. I had the same problem. It wasted one whole day to figure out what was wrong.

My symptom was the same: was not updated. I followed everything what this book asked. I also search this forum and googled it. I did “clean -> project” and “fix the project properties”. Nothing worked. I created and deleted GeoQuiz project at least 10 times. Never worked.

How did I solve?
It was simple. I deleted ADK folder, and re-downloaded and re-installed ADK. Then? It started to work at the first trial!! What the… :cry:
Anyway, if someone has the same error, delete your Eclipse & ADK directory, re-download it and re-install it. Don’t waste your day like me. :sunglasses:


Having same trouble with findViewById( I’ve cleaned, checked my code over and over… no spelling errors used code assist as much as possible. Looking at the R.Java file all the buttons are listed but in the findViewById finds by next_button but not the true_button and the False_button. New to Android but not to programming, C, C++, VHDL, Java.


Me again… I have 3 files. one under appcompat_v7 and 2 under GeoQuiz and one under my geoquiz directory…that can’t be good.
These are all auto generated files but when you are trying to link stuff to them sounds like trouble to me. I think I’m going to do what one member suggested and delete Eclipse (dang) and re-install maybe I picked up extra “support” I don’t need.
Any ideas?


I have under android support v7 app compat (which I believe I got from installing the support library)

I have under inside the gen folder.

It seems to work for me like this, all ID’s showing up in the file and references working. I wonder what we did differently.

Mine show up in the the latter of the 2 R files under:
public static final class id {
public static final int true_button=0x7f05003c;
public static final int false_button=0x7f05003d;



I also had this problem, and downloading and reinstalling the ADT bundle worked for me too.

Incidentally, I’m using Windows 7 and also updated my JDK at the same time; maybe that’s related. Thanks to kemjin for posting a suggested fix!