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

前端 未结 26 1268
眼角桃花
眼角桃花 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 13:58

    Remove the folder libs in your project

    0 讨论(0)
  • 2021-01-31 13:59

    tl;dr: also check for stale SDK paths in the "local.properties" file.

    Here's how I fixed it: I went through the answer given by Richard Le Mesurier, and also checked the path to the Android SDK in Window > Preferences > Android as mentioned by CommonsWare (since I did indeed change the SDK directory a while ago), however it still couldn't find it.

    Then I noticed that I had a file called "local.properties" which referenced the old location for "sdk.dir". I changed that to the new location to match what was in Window > Preferences > Android. Then deselected the build target in Project > Properties > Android, hit Apply, re-selected it, and hit OK and cleaned the project. That worked! Thanks all!

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

    Another possible explanation is that Eclipse has forgotten its Android plugin. This can happen if you switch workspaces, as happened in my case. I tried to re-import an existing Android project, and it couldn't find the basic java system libraries, since it was pointing to the standard android jars. Reinstalling the android plugin (Help->Eclipse Marketplace, then search for "Android" and pick "Android Development Tools for Eclipse") fixes it.

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

    Try to create new project like this then try it

    Screenshot of 'New Android Project' window

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

    In my case, The JRE went missing (disapear from Eclipse option).

    All I did to fix this is re-add the JRE under Windows -> Preferences -> Java -> Installed JREs.

    mine was located at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

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

    I right clicked project and Closed it. Then reopened it. That fixed the problem.

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