Can’t use android:xlargeScreens=“true”?

主宰稳场 提交于 2019-11-28 13:18:25

It looks like you need to build different APKs for older and new versions. Checkout out the blog posted on http://android-developers.blogspot.com/search/label/Android%20Market about multiple APK support: "Multiple APK support gives you a variety of ways to control app distribution. For example, you could use it to create separate APKs for phones and tablets under the same product listing."

Please check your project Build Target To support xlarge screen your project build target should be atleast android 2.3.3 adk.

In Eclipse -?right click on project -> Properties -> Android -> Select Project Build Tagrget as 2.3.3 or onwards

My application supports android versions 1.5 to the latest version and this is what I have in my manifest:

<supports-screens
      android:largeScreens="true"
      android:normalScreens="true"
      android:smallScreens="true"
      android:anyDensity="true" />

This is what shows up on the android market developer site for my app:

Screen layouts: SMALL NORMAL LARGE XLARGE
Required device features
        android.hardware.touchscreen
This application is available to over 555 devices.

Also, my project build target is 2.3.3, but I still have many installs on devices running android 3.0

And this is just a guess, im not sure about this, but wouldn't including permissions like CALL_PHONE filter your application from search on a tablet since they dont have that feature?

You need to use at least android API Level 9 for android:xlargeScreens to be recognized in AndroidManifest.xml.

For this make sure in your default.properties file you have target=android-9 or higher. This also can be set using Project Properties, in Android section.

The problem is your minSdkVersion.

The xlargeScreens-attribute was introduced in API-Level 9. Since you specified that your application will probably run under API-Level 4, android can't find this attribute.

Change the minSdkVersion-attribute to 11 and it should work.

The targetSdkVersion-attribute, which you set to be 11 only indicates that the App was developed to target this version (so it's "recommended"), but the minSdkVersion specifies the minimum API-Level, see here.

What is your API level set to? It says in the documentation that it requires API 9 or higher. 9 is 2.3. See this link which says:

android:xlargeScreens Indicates whether the application supports extra large screen form-factors. An xlarge screen is defined as a screen that is significantly larger than a "large" screen, such as a tablet (or something larger) and may require special care on the application's part to make good use of it, though it may rely on resizing by the system to fill the screen. The default value for this actually varies between some versions, so it's better if you explicitly declare this attribute at all times. Beware that setting it "false" will generally enable screen compatibility mode. This attribute was introduced in API level 9.

android:xlargeScreens :
This attribute was introduced in API level 9 (Android 2.3.3). If you have your build target lesser than API level 9, then you will get error "No resource identifier found for attribute 'xlargeScreens' in package 'android"
Set your build target to API level 9 or above and this error will vanish.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!