Reputation: 81
I've had a project built by eclipse saved, then my computer sort of died. When I fixed it and reformatted I redownloaded eclipse and such. Actually, when I press on "eclipse.exe" it shows me the eclipse juno icon but the window's name is Java- ADT and and it looks kind of differently. I've installed the ADT Plugin and all the Android APIs but when I import my project, when it opens the classes lets say, it doesn't recognize anything. I mean, Strings, classes, imports, android, nothing.
It says: The import android cannot be resolved. Or: String cannot be resolved as a type.
Does anyone have an idea?
BTW: XML works fine.
Upvotes: 6
Views: 22187
Reputation: 34367
Go to Menu(Windows) ->Preferences -> Java -> Installed JREs
and make sure your JREs are available and appropriate one is selected. If not (I hope, that's the case), add the libraries by using Add
button in the right side and browsing the JRE installed location.
In addition to above step, go to Right Click(project) -> properties -> Java Build Path -> libraries
. Again make sure, right libraries and Jars are selected there and valid. If not, add/correct them.
Upvotes: 7