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 trialAlexis Doris
Courses Plus Student 6,523 PointsProblem with losing import of R class
Not really a question, but I ran into a problem that other might face. I had an error in one of my xml files that was pretty well hidden (I wrote layout_alignCenterVertical instead of layout_centerVertical) and when i did the clean and rebuild that Ben suggested in this video, it caused the R class import to be unrecognized in all of my classes.
So if you have this problem, you probably just have an xml error, just fix it and rebuild.
2 Answers
David Anton
Courses Plus Student 30,936 Points- Fix your xml syntax error
- Clean
- Rebuild
- Restart Android Studio
Gnani Pasupula
3,915 PointsGo to File on Top right corner > Invalidate Caches / Restart > Invalidate and Restart. It worked for me .