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

Android Android Lists and Adapters (2015) Custom ListViews getView() and the ViewHolder Pattern

Dhruv Patel
Dhruv Patel
8,287 Points

R resource file missing

I've had this problem on my desktop before and I just can quite seem to know how to fix it. I'm writing my code as usual and when I'm about to reference an id in the R resource file it shoots an error saying "Cannot resolve symbol R", then I try my best to see if the R resource file is still there and I can't locate it either. Am i doing something wrong, or is this just a bug in Android Studio?

1 Answer

Niyamat Almass
Niyamat Almass
8,176 Points

You need to rebuild your project.If you don't know how to rebuild your project then follow the below instruction On the above navigation bar of your android studio you can find "Build".

Build -> Rebuild Project

Hope that helps!

Dhruv Patel
Dhruv Patel
8,287 Points

Thanks. That really did help. I guess I was missing an import or something like that.