Resource ID not resolved


I am trying out the first example and get errors in file:


import android.os.Bundle;
import android.view.Menu;

public class QuizActivity extends Activity {

protected void onCreate(Bundle savedInstanceState) {
    setContentView(R.layout.activity_quiz);<------------ "R" unknown
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(, menu);<----------- "R" unknown
    return true;


My activity_quiz.xml and strings.xml are per the book.

Any suggestions? This forum looks fairly inactive so I have some suspicions the others have the same problem or that people are simply reading the book and not running the code. I am running the most recent ADT (Build: v21.1.0-569685)


Have you changed the file?


Nope. No changes to any generated files.


That means that your file is not being generated.

  1. Try to clean your project (project->clean) and rebuild it.

  2. if not worked, delete the folder gen in your project.

  3. you are not running the most recent ADT, if 1) and 2) didn’t work, download the bundle ADT 22 (latest build). After the download you can set the SDK Path so don’t need to download all the SDK Api’s/sources/other. After the update import your project into the new workspace. It’s a pain to do that, but works for me.

In my past experience that only occurred to me when i update the SDK. So i tried very processes to solve the issue and the only that really worked in most cases was the 3).


Same problem here. Just bought the book yesterday and trying out the first project. As soon as I’ve configured the new activity and hit finish to create and open the new project, my gen folder is created empty. the SDK and ADT are fully updated, I’ve tried restarting everything, I’ve tried Project -> Clean, right clicking the project root and doing Android Tools -> Fix Project Properties, as well as deleting gen and rebuilding. Still nothing but an empty gen folder. :confused:

Anyone have any ideas?


Ok, that was +/- unexpected. Try an answer in google official Android Developer site… google launches updates “everyday”, so they that can bring a lot of bugs, which appears to be the case. Good luck


Same issue have checked every line of code, cleaned, have the most recent update, and still get this error. If anyone figures out a fix please post.


I had the same problem. Leaving “action_settings” string as is instead of changing it to a “menu_settings” string seems to have solved the problem.
Check the thread: "menu_settings vs. action_settings in string resources ".


I figured out the problem make sure you have the newest SDK Build-tools installed Rev. 17. I installed and restarted and the R files have returned. Thanks for the help to all who contributed.


I’m still having the issue. Like I said all my stuff is up to date, and I don’t change any files. Literally as soon as I start a new Android Application the gen folder is created completely empty.

Please help!!