我有一个应用程序来释放它适用于所有Android的屏幕尺寸(小除外)和密度高于SDK 2.0版本。
I have an app to release which works on all android screen-sizes (except smaller) and densities above SDK version 2.0.
这也将在超大屏幕上运行。 目前,我已经加入这样的:
It will also run on extra large screens. Currently I have added this:
<supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="false" android:anyDensity="true" />
但我还需要添加安卓xlargeScreens =真正的,以允许其在安卓市场上超大屏幕设备可见的,因为默认情况下它是假的。
But I also need to add android:xlargeScreens="true" , to allow it visible in android market on extra large screen devices, since by default it is false.
但要加安卓xlargeScreens 我需要改变我的Eclipse targetsettings以2.3为这个属性是从API级别9加入
But to add android:xlargeScreens I need to change my eclipse targetsettings to 2.3 as this attribute was added from API level 9.
所以,我应该怎么做我对这种情况下的目标编译设置?它应该是2.3在编译时?如果是的话,那么将应用程序不能在设备上运行2.0的版本,而给予的任何问题?
So what should I do with my target compilation settings for this scenario ? Should it be 2.3 while compiling ? If yes, then will the app not give any problems while running on devices with 2.0 version ?
推荐答案在阅读的这个博客中,我想我有我的老问题一个答案。下面摘录(这是另一个明显的属性requiresSmallestWidthDp从3.2中引入):
While reading this blog post I guess I have an answer on my old question. An extract below (which is for another manifest attribute "requiresSmallestWidthDp" introduced from 3.2):
美中不足的是,你必须编译你的应用的Android 3.2或者为了使用requiresSmallestWidthDp属性越高。旧版本不理解这个属性,并会引发一个编译时错误,做最安全的做法是开发对您为的minSdkVersion所设置的API级别相匹配的平台,你的应用程序。当你正在做最后的preparations建立你的候选版本,更改构建目标至Android 3.2,并添加requiresSmallestWidthDp属性。超过的Android版本3.2只是忽略XML属性,所以这是一个运行时出现故障的风险。
"The catch is that you must compile your application against Android 3.2 or higher in order to use the requiresSmallestWidthDp attribute. Older versions don’t understand this attribute and will raise a compile-time error. The safest thing to do is develop your app against the platform that matches the API level you’ve set for minSdkVersion. When you’re making final preparations to build your release candidate, change the build target to Android 3.2 and add the requiresSmallestWidthDp attribute. Android versions older than 3.2 simply ignore that XML attribute, so there’s no risk of a runtime failure."
更多推荐
在AndroidManifest.xml中Android的相容性设置
发布评论