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

Miles Torres
Miles Torres
2,316 Points

All over my java classes It says that it cannot resolve Symbol R

How do I fix it?

2 Answers

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!

Miles Torres
Miles Torres
2,316 Points

When I do this pops up: Error:Execution failed for task ':app:preBuild'.

failed to find target android-20 : C:\Users\MilesPC\AppData\Local\Android\android-studio\sdk

Niyamat Almass
Niyamat Almass
8,176 Points

I don't know it's work or not. I think you might not have the Android-20 sdk installed. Go to Tools > Android > SDK Manager and check to see if Android (20) is installed.If you see that it already install then restart your PC.

Otherwise post your build.gradle file.