1

I've spent the past 2-3 hours today and yesterday looking for a reason why ADT won't generate my R.java file. I've gone through cleaning, making sure SDK versions match up, making sure I have everything updated, and checking over my XML files.

The XML files don't have any obvious errors, but I could be wrong. Haven't touched Java in years :)

Note that this is a completely brand new install of ADT, and the error appears immediately after I start a new project, before I even change anything. I've tried this on 2 PCs to eliminate some weird path problems on my work PC. Nothing still.

I've gone through all the tips in here, for example: "R cannot be resolved to a variable"?

Community
  • 1
  • 1
Big Millz
  • 91
  • 7
  • I just moved to Eclipse:Kepler yesterday, didn't have any major problems. Unpacked Eclipse, ran it, went to the marketplace and installed ADT, imported projects from Juno. What's the error? – Ray Stojonic Oct 04 '13 at 13:16
  • I did the ADT bundle (http://developer.android.com/sdk/index.html), unpacked, ran the SDK manager to get that loaded, copied eclipse to another folder, and ran it. Upon making a new project, MainActivity opens, and shows 'R cannot be resolved to a variable' errors on lines 12 and 19: setContentView(R.layout.activity_main); getMenuInflater().inflate(R.menu.main, menu); – Big Millz Oct 04 '13 at 13:38
  • [It says here](http://developer.android.com/sdk/installing/bundle.html) not to move the eclipse files, if you do, you'll have to update some preferences - not the end of the world, but they don't detail which preferences to update. (see the Caution) – Ray Stojonic Oct 04 '13 at 14:10
  • HOLY CRAP that did it! Works perfectly now, builds the .R! Thanks for your help - appreciate it. – Big Millz Oct 04 '13 at 14:37

0 Answers0