如何在 Eclipse 中更改 minSDK 版本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3865567/
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
How to change the minSDK Version in eclipse?
提问by Shijilal
While creating a new android project in eclipse 3.5, i have selected Android 2.1 Update1 as build target. But i forgot to give the mini SDK version. Now when the build the project, its giving a warning message "WARNING: Application does not specify an API level requirement!Device API version is 8 (Android 2.2)"
在 eclipse 3.5 中创建一个新的 android 项目时,我选择了 Android 2.1 Update1 作为构建目标。但我忘了提供迷你 SDK 版本。现在,当构建项目时,它会给出警告消息“警告:应用程序未指定 API 级别要求!设备 API 版本为 8 (Android 2.2)”
The application is running fine..but when i run that application is my Samsung Galaxy S which is having android 2.1, the application is behaving differently.
该应用程序运行良好..但是当我运行该应用程序时,我的三星 Galaxy S 具有 android 2.1,该应用程序的行为有所不同。
I have even tried adding
<uses-sdk minSdkVersion="7" />
in the manifest file..But still i am getting the warning message..
我什至尝试添加
<uses-sdk minSdkVersion="7" />
清单文件..但我仍然收到警告消息..
So how can i change the mini SDK of my project in eclipse to 7,so that i get the same result in my emulator and Mobile phone?
那么如何将eclipse中项目的mini SDK改成7,才能在模拟器和手机上得到同样的结果呢?
Thanks in advance Shijilal
提前致谢
回答by Octavian A. Damiean
In your manifest there should be something like this
在你的清单中应该有这样的东西
<uses-sdk android:minSdkVersion="int" />
Now just change the number to the desired version number. Additionally you should also change the value of the target
in the default.properties
file.
现在只需将数字更改为所需的版本号。此外,你也应该改变的值target
中default.properties
的文件。