I have created a dummy Android project from within Android studio, and I can make it run, but the Editor itself fails to find the R class. In fact I can\'t find the gen fold
@joe_deniable gave me the idea to look closer in the build folder, and I found a folder that had been excluded by intellij, where my R was happily having an ice cream. This was here:
build/source/aidl/debug
I had to remove this folder from the exclusion list and add it to the sources, and could finally start coding in this new IDE.
Thanks
you can find it in the directory app/build/generated/source/r/debug/package name.
Another possibility is that the package you used has some issue - the target package is not the same with the defined one. In turn, R can not be found in the package.
The folder layout is different to eclipse. I don't think there's a "gen" folder. My "R" file is in the following location:
(module name)/build/source/r/debug/(package name)/R.java
I think this file is created when you create a new project using the wizard.
I had the same problem on linux. I've resolved it installing ia32libs and rebuilding the project. The R class is generated from android.
Goto to Top right corner in Studio, click on search button enter R.java , you will get the file
thank you