No R.Java (purchased book)

Hey guys, I just bought the book at Amazon and it looks pretty good so far, but I am at an impasse.

I am at the part of the book that talks about R.Layout(.ActivityQuiz).

The app/build/generated/source/r/debug directory does not exist, as shown in the book, but this one does:


Anyway, when I go through app/build/generated/source/rs/debug, I find that there is no file called, as the book reads.

Any help is appreciated.



I found an file here:

These are all the imports I have:

import android.os.Bundle;

How is it getting access to that R file with just those imports?

You might try cleaning and rebuilding the project.
Build —> Clean Project
Build —> Rebuild Project

This should generate those files as needed.

Yeah, still nothing. I have an R file that I’ve been looking at in


The path that I expected it to have R in:


does not exist. It’s the closest thing I found to the path that the book gives.

the folder mentioned in the book is the correct folder. How are you browsing to see this? In the package manager, in the file system? Curious that those files would not exist. Is it possible that you didn’t create the app right in Android Studio and that is why it’s not creating those files? Maybe try creating a new blank android project.

i have the same problem and i have spent like 4 hours and still nothing.
I also made a question in Stackoverflow

Did you find a solution?

i found the answer and i post it here for future reference: