eclipse 将文件导入工作区生成无法解析目标“android-5”

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

Importing file into workspace generate Unable to resolve target 'android-5'

androideclipse

提问by jemz

I always encountered problem like this Unable to resolve target 'android-X',every time I will import file in the workspace,last time also encountered like Unable to resolve target 'android-10', so i insatalled SDK Platform Android 2.3.3,.. now 'android-5',do i need to install again the SDK Platform Android 2.0?i tried to fixed this by doing right click on the project and scroll down to Android Tools-->Fixed Project Properties,but it is not working.Can you help me please. Thank you in advance.

我总是遇到这样的问题无法解析目标'android-X',每次我都会在工作区中导入文件,上次也遇到无法解析目标'android-10',所以我安装了SDK平台Android 2.3.3 ,.. 现在是“android-5”,我是否需要再次安装 SDK 平台 Android 2.0?我尝试通过右键单击项目并向下滚动到 Android 工具--> 固定项目属性来解决此问题,但它是不工作。你能帮帮我吗?先感谢您。

回答by Theo

Unable to resolve target 'android-5' means that you do not have Android SDK level 5 APIs downloaded on your computer. Start the SDK manager, click the Obsolete check mark and then download the Level 5 APIs.

无法解析目标“android-5”意味着您的计算机上没有下载 Android SDK 5 级 API。启动 SDK 管理器,单击 Obsolete 复选标记,然后下载 Level 5 API。

Alternatively, go into the project properties and change the target SDK version from android-5 to something else that is present on your computer.

或者,进入项目属性并将目标 SDK 版本从 android-5 更改为您计算机上存在的其他版本。

回答by Benna

Go into: Project>properties>Resource>Android>Project Build Traget> and select the available target version! It will work-

进入:Project>properties>Resource>Android>Project Build Traget> 并选择可用的目标版本!它会起作用-

回答by devandroid

Go into: Project>properties>Resource>Android>Project Build Traget> and select the available target version! It will work

进入:Project>properties>Resource>Android>Project Build Traget> 并选择可用的目标版本!它会工作

If it gives error Android requires compiler compliance level 5.0 or 6.0

如果它给出错误 Android 要求编译器合规性级别 5.0 或 6.0

Rightclick on project-->Android tools-->fix project properties

右键项目-->Android工具-->修复项目属性

回答by Joel

What worked for me was Right click on the project > Android Tools > Fix Project Properties.

对我有用的是右键单击项目> Android 工具> 修复项目属性。