Reputation: 1615
If I make a new Android project in Ecplipse and I try, to open one of the samples from android SDK, I have got an error, look like this:
R cannot be resolved
What can I do, to be able, to run these files? I tried to delete import android.R; but nothing changed.
Thanks
Upvotes: 0
Views: 141
Reputation: 2268
Check your XML-Layout files. The problem come here half a time.
If you are sure it is note your layout file, check in your java build path if the google librarys are well set. (Google APIs)
(sorry for my bad english)
Upvotes: 0
Reputation: 11257
You possibly got error in building resources. Possible fixes:
-refresh your project (F5)
-clean you project and refresh
-see "Console" tab, sometimes the problem is shown there
-reload the Android SDK
-restart the Eclipse IDE
Upvotes: 1
Reputation: 64399
First thing you might try is "clean" your project (option in the menu). If it persists:
There should be an error that stops R from being generated. Check the "problems" tab (?) in eclipse to see what that problem is, and solve that. It could be missing libs, or various other stuff.
Upvotes: 1