简体   繁体   中英

Eclipse not recognizing Strings and Classes

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.

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.

重新下载JDK,这将自动更新Eclipse。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM