“Unable to get system library for project” after I upgraded to Android SDK 2.3 and ADT 8.0

前端 未结 26 1271
眼角桃花
眼角桃花 2021-01-31 13:25

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

相关标签:
26条回答
  • 2021-01-31 14:15

    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.

    0 讨论(0)
  • 2021-01-31 14:17

    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.

    0 讨论(0)
  • 2021-01-31 14:18

    In my case, ADT needed update (in Eclipse menu Help/Check for Updates, or Help/Install New Software). Check your ADT!

    0 讨论(0)
  • 2021-01-31 14:18

    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.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-01-31 14:20

    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.

    0 讨论(0)
提交回复
热议问题