Today I upgraded to Android SDK 2.3 and I also upgraded the Eclipse Plugin Androi Developer Tools 8.0 (from 0.9.9). I also upgraded my Java Development Kit to 1.6_22.
No
I had this problem come out of nowhere.
What worked for me was to right-click the project, select Android Tools, Add support Library..
It is the android.jar that is missing, and this restores it.
I tried several options mentioned here, but nothing worked. Then I rebooted my Ubuntu machine and started Eclipse again. Then everything was solved. Just reboot.
In my case, ADT needed update (in Eclipse menu Help/Check for Updates, or Help/Install New Software). Check your ADT!
That is rather difficult to answer, given the limited information you have supplied. Here are some suggestions:
Make sure that an appropriate android.jar
is in your build path, since that is where java.lang.Object
would come from.
Do a Project > Clean, to make sure you have 1.6 .class
files, in case that is part of the problem.
Try creating a new project from scratch and see if that works.
java.lang.Object cannot be resolved in Eclipse
This problems started to appear recently for me after I upgraded ADT. As suggested above, when I uncheck+Apply/check+Apply project build target it would help , but the problem would come back eventually. So instead I just added android.jar explicitly to the build. This is the entry in the .classpath file
<classpathentry kind="lib" path="/Applications/adt-bundle-mac-x86_64/sdk/platforms/android-19/android.jar"/>
This is more of a workaround as I would have to change it every time I change the SDK version, but at least no need to play with properties to get it to build when I restart Eclipse.
Project->Properties->Android : Select another Android Target (in my case Android 4.0.3) -> Apply changes. THEN select again your default Android Target, and that is all.
Hope this help.