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 trialDeniz Beser
Courses Plus Student 2,417 PointsI 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
Admire Dhodho
5,411 Pointsif u are using windows go point on the red r and press alt + enter
Sam Wilskey
3,420 PointsHello 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!
Deniz Beser
Courses Plus Student 2,417 PointsErrors 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!
Sam Wilskey
3,420 PointsDoes the R in android studio have a red squiggly line underneath it? If it does what does it say when you mouse over it?
Deniz Beser
Courses Plus Student 2,417 PointsNo, the capital R is entirely red. when I mouse over it it says "Cannot resolve symbol R."
Deniz Beser
Courses Plus Student 2,417 PointsDeniz Beser
Courses Plus Student 2,417 PointsI updated all the software and edited the old code to adapt the new sdk and etc. Now it works. Thank you!