Eclipse Android 更改 API 级别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2944074/
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
Eclipse Android Change API Level
提问by Ian Vink
Once I have created a project with the Android wizard, how do I change the API Package from say 1.5 to 2.1 ?
使用 Android 向导创建项目后,如何将 API 包从 1.5 更改为 2.1 ?
I'm not referring to the application xml where the minimum API is set, I'm referring to the jar's included in my project to the Google APIs.
我不是指设置最小 API 的应用程序 xml,我指的是包含在我的项目中的 jar 到 Google API。
回答by Janusz
Are you using Eclipse for this because you tagged the question with eclipse. If you are using Eclipse just right click on your project select properties now choose android. You should now be able to select another build target. If you want to the API package change the checkbox from 4 to 7.
您是否为此使用 Eclipse,因为您使用 eclipse 标记了问题。如果您使用的是 Eclipse,只需右键单击您的项目选择属性,现在选择 android。您现在应该能够选择另一个构建目标。如果您想要 API 包,请将复选框从 4 更改为 7。
If you are not using Eclipse and want to use the Android console program use the terminal program android in the following way
如果你没有使用 Eclipse 并想使用 Android 控制台程序,请按以下方式使用终端程序 android
android update project -p <path to project> -t <new target api level>
回答by Roman Rdgz
Using Eclipse, it may not change the SDK version correctly just going right click and properties. Open the manifest file and change the line
使用 Eclipse,它可能无法正确更改 SDK 版本,只需右键单击和属性即可。打开清单文件并更改行
<uses-sdk android:minSdkVersion="number-of-version-you-want" />