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 Build an Interactive Story App (Retired) Finishing the User Interface Customizing the Buttons

I received a sudden "cannot resolve symbol R" error, after I did everything exacty on the video and tried to run the app

I searched the internet to find a solution, yet there seemed to be not a single cause or solution for this.

2 Answers

if u are using windows go point on the red r and press alt + enter

I updated all the software and edited the old code to adapt the new sdk and etc. Now it works. Thank you!

Hello Deniz Beser,

Sometimes this can happen. There are a couple of things that you can try to see if it fixes the problem. The first would be to just restart Android Studio.

If that does not work you can go to the Build menu and select clean build. That will rebuild the project and should create a new R resource.

Hope that helps!

Errors seemed to dissappear at first, but onceI tried to run the app, they all showed up again despite the actions you mentioned. Shall I send parts of my code; if so, which? Thanks for help Sam Wilskey!

Does the R in android studio have a red squiggly line underneath it? If it does what does it say when you mouse over it?

No, the capital R is entirely red. when I mouse over it it says "Cannot resolve symbol R."