android找不到目标

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1671462/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:26:40  来源:igfitidea点击:

android can not find a target

androidlinuxeclipse

提问by EthanZ6174

i am using eclipse with android plugin and sdk, but i can not create a virtual device due to there is no target, and when I execute this:

我正在使用带有 android 插件和 sdk 的 eclipse,但由于没有目标,我无法创建虚拟设备,当我执行此操作时:

  $ ./android list targets
   Available Android targets:

what should i do?

我该怎么办?

and..............

和..............

when i try to install the available packages in eclipse avd manage it comes to:

当我尝试在 eclipse avd manage 中安装可用软件包时,它涉及:

Downloading SDK Platform Android 2.0 API5, revision1 SSL peer shutdown incorrectly....

下载 SDK Platform Android 2.0 API5, revision1 SSL peer shutdown 不正确....

回答by Pierre-Antoine LaFayette

Run tools/android to retrieve targets. It'll load up a gui interface, under settings check the box that says force https to be fetched using http. Then go to Available packages and select the version of Android you want. The targets are not downloaded by default in the latest sdk release.

运行 tools/android 来检索目标。它将加载一个 gui 界面,在设置下选中强制使用 http 获取 https 的框。然后转到可用包并选择您想要的 Android 版本。在最新的 sdk 版本中,默认情况下不会下载目标。

At least that's what you get on windows, I don't have a linux machine available at the moment but the tools/android tool was created to manage targets and avds.

至少这就是你在 windows 上得到的,我目前没有可用的 linux 机器,但创建了工具/android 工具来管理目标和 avds。

回答by Aurelien

I had the same issue and had to go to Eclipse > Window > Preferences > Android to set the Android SDK location (C:\Program Files\Android\android-sdk in my case).

我遇到了同样的问题,不得不转到 Eclipse > Window > Preferences > Android 来设置 Android SDK 位置(在我的例子中是 C:\Program Files\Android\android-sdk)。

回答by Qoo

I restarted eclipse with "eclipse -clean" and this solved my problem.... I do not know if restarting also will solve the problem

我用“eclipse -clean”重新启动了eclipse,这解决了我的问题......我不知道重新启动是否也能解决问题

回答by Matt

You need to run the android application and tell it to fetch the sources from the Android repositories. See this post for an explanation: http://techpad.co.uk/content.php?sid=96

您需要运行 android 应用程序并告诉它从 Android 存储库中获取源代码。请参阅此帖子以获取解释:http: //techpad.co.uk/content.php?sid=96