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 trialJames B
229 PointsError in Eclipse When Opening new Android Project
I get two errors on the problems tab before I make any modifications. Both are for this;
R cannot be resolved to a variable
On lines 12 and 18 of MainActivity.java .
I'm using the SDK supplied in the teachers notes (Windows 64 bit)
This is in the "src" directory, not the "res" directory. But shows up as an error regardless.
Help?
3 Answers
James B
229 PointsYes. I have the windows 64 bit android platform installed.
After poking around online, the problem may be related to "R" not being created under the "gen" folder.
Which step do you believe I may have missed?
James B
229 PointsI ended up just switching over to Android Studio to progress in the lessons. Wasn't able to get Eclipse to generate the R file.
Ryan Carson
23,287 PointsHi James,
Have you read the "Teacher Notes" yet on the video page here? I think it might solve some of your problems.
Ryan