All java classes and objects gone (eclipse, android SDK)
I've got t开发者_Python百科his really weird problem, have been working on a project all night and suddenly when I open Eclipse, I get hundreds of errors.
Nothing from String
to Java.IO
can be found... text like import java.io can not be resolved
is everywhere. I have no clue what I have done, anyone can give me a hint? I would really appreciate it!
/Nick
ALSO, check if your JRE is selected as the Default JRE in the Eclipse-Preferences (under Java). Common cause for me at least.
Possible fixes:
-Reset the path to the Android SDK.
-Check if all libraries are on place
-Clear the project and try to rebuild
-Refresh the project
-Check the Console tab - sometimes the root of all problems is shown there.
-Check if there is some problems in the res
dir, sometimes gen/R.java could't be build because of that
Happened to me after refactoring once. Check your .project file. Make sure it contains those entries:
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
精彩评论