Android Studio R.java

Anthony picture Anthony · Aug 30, 2013 · Viewed 45.9k times · Source

I'm seeing a crash on an older device that works on multiple newer devices:

android.content.res.Resources$NotFoundException: Resource ID #0x7f030035

If I recall correctly you could look at the R.java to see the culprit, however in Android Studio it doesn't seem to exist. Where is the R.java so I can correlate that ID?

Thanks.

Answer

Max West picture Max West · Feb 23, 2015

In Android Studio 1.1.0 the R.java file is under

Project/app/build/generated/source/r/debug/com.android.'projectname'/R.java

If you don't see the above collection of folders, clean and build the project first. It takes a few minutes and you'll see Gradle running at the bottom of the IDE.