无法解析目标“android-17”

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

Unable to resolve target 'android-17'

androideclipse

提问by anonymous

I know there are some sort-of duplicates of this, but none of the answers have been able to help me so far.

我知道有一些类似的重复,但到目前为止,没有一个答案能够帮助我。

When I open a project, I get the following error:

当我打开一个项目时,出现以下错误:

 [2014-01-07 14:18:00 - Permissions] Unable to resolve target 'android-17'

Does anybody know what may be the problem here?

有人知道这里可能有什么问题吗?

回答by FOliveira

You can right click on your project -> properties -> Android -> Select the Target android version you want to compile and Apply !

您可以右键单击您的项目 -> 属性 -> Android -> 选择您要编译和应用的 Target android 版本!

If you don't have any target versions to compile, you probably need to download them on your SDK Manager

如果您没有任何要编译的目标版本,您可能需要在您的 SDK 管理器上下载它们

回答by Wisley Lov

  1. Open your Android SDK Manager, and make sure your SDK API is installed

  2. You might have several Android SDK folders installed, like me; check that your workspace build path is the one your machine defaults to.

  1. 打开您的 Android SDK 管理器,并确保您的 SDK API 已安装

  2. 你可能像我一样安装了几个 Android SDK 文件夹;检查您的工作区构建路径是否是您的机器默认的路径。

回答by ColossalChris

Sometimes the error can appear when you are working with source code built with an ADT that is a higher version than what you are currently using. It could be worth it to see if ADT has a later version than you are working. Sometimes ADT (especially with Eclipse. Link to get new here: https://developer.android.com/sdk/index.html) cannot find updates when asked to find them so you may need to install the newest version and overwrite/delete the old version

有时,当您使用比您当前使用的版本更高的 ADT 构建的源代码时,可能会出现错误。看看 ADT 的版本是否比您正在使用的版本更高,这可能是值得的。有时 ADT(尤其是使用 Eclipse。在这里获取新的链接:https: //developer.android.com/sdk/index.html)在被要求找到更新时找不到更新,因此您可能需要安装最新版本并覆盖/删除旧版本

回答by Emmanuel

You are probably trying to use a library that was built using API 17 and you do not have it installed. If you are using API 18+ you will be fine.

您可能正在尝试使用使用 API 17 构建的库,但您没有安装它。如果你使用 API 18+,你会没事的。

回答by shabby

goto your sdk manager.exe open it, check the API 17 checkbox and click the 'install x packages' button, this will download and install these packages, if the project still shows error go in your project build path and fix the library path error if any

转到您的 sdk manager.exe 打开它,选中 API 17 复选框并单击“安装 x 包”按钮,这将下载并安装这些包,如果项目仍然显示错误,请进入您的项目构建路径并修复库路径错误如果有的话

回答by Mark Cramer

The target API in project.properties may be different from the one you have installed. This may happen if you reinstall Eclipse, for example. Open the Android SDK Manager and check to see which version of the API you have installed. Then go to project.properties and set "target=android-xx" when "xx" is your API version.

project.properties 中的目标 API 可能与您安装的不同。例如,如果您重新安装 Eclipse,可能会发生这种情况。打开 Android SDK Manager 并检查您安装的 API 版本。然后转到 project.properties 并在“xx”是您的 API 版本时设置“target=android-xx”。

回答by Supriyanto

It's very simple:

这很简单:

  1. Click Android SDK Manager
  2. Download Android 4.2.2 (Api 17)
  1. 单击 Android SDK 管理器
  2. 下载 Android 4.2.2 (Api 17)

enter image description here

enter image description here

  1. After install Android 4.2.2(Api 17)
  2. Click right on project --> Properties --> Android --> Target Build Target
  3. Choose Android 4.2.2 Api 17.
  4. Finish
  1. 安装 Android 4.2.2(Api 17) 后
  2. 右键单击项目 --> 属性 --> Android --> 目标构建目标
  3. 选择 Android 4.2.2 Api 17。
  4. 结束