eclipse 未找到 Android SDK 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14932974/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android SDK not found error
提问by inankupeli
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.
我正在开发一个使用 Facebook SDK 的 Android 项目。直到今天一切都很好。当我尝试运行该项目时,它给出了以下错误。
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,
虽然我有 SDK 2.3.3(级别 10),但它没有出现在项目属性中。在 Eclipse 的属性中,它说,
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).
但是,根据 Android SDK Manager,我已经安装了最新版本(见下图)。
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.
我使用的是 Mac OSX 10.8,我尝试重新启动 eclipse 和 os。
回答by Anup Cowkur
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.
您已更新了 android sdk,但未更新与其匹配的 adt。最新的 ADT 版本是 21.1.0,您需要获取它。
Go to eclipse > help > Check for updates.
转到 eclipse > 帮助 > 检查更新。
It should list the latest update of adt. If it doesn't work, try this :
它应该列出 adt 的最新更新。如果它不起作用,请尝试以下操作:
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.
转到 Eclipse > 帮助 > 安装新软件
点击添加
它将列出可用的更新 - 理想情况下应该是 adt 21.1.0(最新)
安装最新的adt,一切都应该没问题。
回答by Android_coder
Try this:
尝试这个:
I found the answer to the problem. (I'm using Helios, but it should work anyway)
我找到了问题的答案。(我正在使用 Helios,但它应该可以正常工作)
Run Eclipse as administrator. (windows 7)
Go to Help → Install New Software.
On Work with: type https://dl-ssl.google.com/android/eclipse/and press ENTER.
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.
When finished, it will ask to restart Eclipse. Make sure you do this.
When Eclipse restarts, all your Android SDK packages should show up again.
以管理员身份运行 Eclipse。(Windows 7的)
转至帮助 → 安装新软件。
在 Work with:输入https://dl-ssl.google.com/android/eclipse/并按 ENTER。
等待 Eclipse 获取存储库。名为 Developer tools 的项目将出现在列表中。将其标记为安装,按下一步并按照步骤安装 ADT 工具。
完成后,它会要求重新启动 Eclipse。确保你这样做。
当 Eclipse 重新启动时,您的所有 Android SDK 包应该会再次显示出来。