Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Sharan Soni
Sharan Soni
3,347 Points

"Cannot resolve symbol R." I've searched on Stack Overflow and they said it's a bug with A Studio is this still true?

All over my Stormy Project (Android) it's been showing the cannot resolve symbol R. I've searched all over the web and most articles say it's a bug with Android Studio is this still case?

1 Answer

Ryan Ruscett
Ryan Ruscett
23,309 Points

I am not sure if it's a bug, but I get it all the time. It's super annoying. I usually do a project clean, then re-build. If that doesn't work, it's usually because somewhere in the build process, it failed.

As the project builds it creates a build file and this R.java file. If it fails to build, the R.java wont get created and the references will show up everywhere.

I usually open up the error console. Then I will remove all the errors. Do a clean and build, but not all my projects (if there is more than 1) but just build the single project. That way it lists only the errors in that project while being built. It usually is an error in there that is obscure that isn't showing up in the code. I fix that and re-build and it works.

Hope this helps.