Java 无法解析目标“android-21”

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

Unable to resolve target 'android-21'

javaandroideclipseadt

提问by Zero

I have the latest ADT plugin for eclipse: ADT-23.0.4.
Eclipse Version: Luna Service Release 1 (4.4.1).

我有最新的日食 ADT 插件:ADT-23.0.4
Eclipse 版本:Luna 服务版本 1 (4.4.1)

Still I am getting this error while importing a project:

导入项目时仍然出现此错误:

Unable to resolve target 'android-21'

无法解析目标“android-21”

采纳答案by No Name

Right Click on Project -> Properties -> android-> choose your target api level you have, Then press Apply and Ok

右键单击Project -> Properties -> android-> 选择您拥有的目标 api 级别,然后按应用和确定

And clean the project once and rebuild it.

并清理一次项目并重建它。

回答by Hacker Celluloid

Go to Windows -> Android SDK ManagerInstall the Android API Level you want, in this case 21.

转到Windows -> Android SDK Manager安装所需的 Android API 级别,在本例中为 21。

Once you've finished installing, go to Window -> Preference -> Android. You should get a list of available targets. Click Applythen Ok.

安装完成后,转到Window -> Preference -> Android. 您应该获得可用目标的列表。单击应用然后确定

Now right click your project, go to properties. Click Android. Choose your desired target.

现在右键单击您的项目,转到属性。点击安卓。选择您想要的目标。