Arun Kumarr wrote:The R stub file is automatically generated by your IDE?
You need to compile the Code and R stubs are automatically generated. Are there any other errors in your project?
Try to fix them and recompile your code.
Arun Kumarr wrote:Ah!! Yes. I think that is what he is mentioning.
In my computer my R file is present inside the jar "..sdk\platforms\android-22\android.jar" at the location android\R.class".
I use version 22 of the sdk. Hence 'android-22' in the directory path.
But wait! Are you not using any android development tool to develop?
If not, start using one. I use the Android Studio built on top of IntelliJ Idea IDE.
You can also use Eclipse for development. But Android Studio is the official supported development environment for android.
I suggest you migrate any old projects (if present) or develop any new projects using android studio.
Mike Tabak wrote:I'm going through the Big Nerd Ranch Android book which uses this environment.
Arun Kumarr wrote:Great. Can you post the error message and your code?
Arun Kumarr wrote:Can you check if the android jars are present in class path, in eclipse?
Ron McLeod wrote:Can you restate the problem? It is unclear if there is actually something wrong, or you are just wondering why android.R and/or your project's R class is needed.