Being a week old in AS, I am trying to find the folder/file paths that are being referenced in some posts. For example, when reading posts about trying to understand how to resolve the lack of an R.java file, several posts refer to a path, such as
"build/source/flavor/r/build type(optional)/package/R.java."
In Android Studio 1.2.2, I created a new project, named it, pasted some XML layout code into the generated layout file, then also the associated Java code for making a popup window, into the Activity window. Then ran the project. It could not find the R.java file so crashed.
My problem at this point is that I cannot seem to find such a path anywhere so I can track things. The path components look like they would be hierarchies in Android projects. But I cannot find anything like this in Windows Explorer, in the Android project window, the Android structure window.... Any ideas?
I don't know if the crashing prevents the R file from generating, since the build never finishes. Or rather if I just need to read more documentation ;) Thanks for any help.
You have an error in one of your resources or your manifest, preventing
R
from being built. If you do not see an error indicator on any of those files in the project tree (left-hand pane in Android Studio), run Tools > Rebuild Project, and you should get an error pane popping up at the bottom of the screen after a moment.In Android Studio 1.2.2, for a standard Android Studio project, the generated
R.java
file will be in:where:
...
is typically going to bedebug
for the sorts of builds that you are doing, but technically will be tied to whatever build variant you are building (see the Build Variants view, docked on the lower left side)your/package/name/
will be based on thepackage
attribute in the<manifest>
element of yourAndroidManifest.xml
file