Having trouble adding xLargeScreens to manifest file

Andris

Active Member
Licensed User
Longtime User
I want to add support for xlargeScreens to my project and thus I've added the line to my manifest file so that it looks like this:

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true" 
    android:xlargeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")

However, compiling gives me the following error message:

B4X:
AndroidManifest.xml:10: error: No resource identifier found for attribute 'xlargeScreens' in package 'android'

Can someone give me a clue as to why? I thought my android.jar might not be the latest version so I downloaded and installed the newest SDK, but it made no difference.
 

gregmartin64

Member
Licensed User
Longtime User
You need to target api verion 9 i.e. target=android-9 ( or more ) in your project properties. Also, you will not be able to support devices below verion 2.3.3

I think, but I'm not sure about this, that Basic4Android has to point to a target below this? So that might be a conflict.
 
Upvote 0

rcalmant

New Member
Licensed User
Longtime User
I solved the pb

Thanks gregmartin64,

To solve the problem, you'll have to
- run SDKManager, and upload API10 for example.
- configure path into B4A : Tools/Configure path
- change android.jar path : ...android-10\android.jar

Then, you'll be able to add android:xlargeScreens="true" with the manifest editor

You'll have to do this if you want your app to be available on tablets...
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
The default value of this attribute is True (at least when you target SDK version 14).

You mean that if Target SDK level is 14 for example, the "android:xlargeScreens" attribute is already included ?
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
I'm have a doubt about it.

Reading google guidelines I found :

Google says :
* For apps targeting minSdkVersion value less than 13, a <supports-screens> element must be declared with both android:largeScreens="true" and android:xlargeScreens="true".

In my manifest I have minSdkVersion = 4 and TargetSDK = 14.
So following the guidelines I have to add the xlargeScreens parameter ?
 
Upvote 0
Top