Android SDK not found error

心已入冬 提交于 2019-12-23 04:53:12

问题


I was working on an Android Project that uses Facebook SDK. Everything was fine until today. When I tried to run the project it gives the following error.

Unable to resolve target 'android-10' until the SDK is loaded

Although I have SDK 2.3.3 (Level 10), it doesn't appear in the project properties. In properties of Eclipse it says,

This Android SDK requires Android Developer Toolkit version 21.1.0 or above.  Current version is 21.0.0.2012-10-31-0-17.  Please update ADT to the latest version.

However, according to Android SDK Manager, I already installed the latest version (see image below).

How can I resolve the problem? Any help would be appreciated, thanks in advance.

Edit:

I'm using Mac OSX 10.8, and I tried restarting both eclipse and os.


回答1:


You have updated the android sdk but not updated the adt to match with it. The latest ADT release is 21.1.0 and you need to get this.

Go to eclipse > help > Check for updates.

It should list the latest update of adt. If it doesn't work, try this :

  • go to eclipse > help > Install new software

  • Click on add

  • add this url : https://dl-ssl.google.com/android/eclipse/

  • It will list the updates available- which should ideally be adt 21.1.0 (latest)

  • install the latest adt and everything should be fine.




回答2:


Try this:

I found the answer to the problem. (I'm using Helios, but it should work anyway)

  1. Run Eclipse as administrator. (windows 7)

  2. Go to Help → Install New Software.

  3. On Work with: type https://dl-ssl.google.com/android/eclipse/ and press ENTER.

  4. Wait for Eclipse to fetch the repository. An item named Developer tools will appear in the list. Mark it for install, press Next and follow the steps to install the ADT tools.

  5. When finished, it will ask to restart Eclipse. Make sure you do this.

  6. When Eclipse restarts, all your Android SDK packages should show up again.



来源:https://stackoverflow.com/questions/14932974/android-sdk-not-found-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!