Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can’t use android:xlargeScreens="true"?

I am making app for phones, but I wan’t them to be usable on tablets. I don’t know why can’t. I use this in my android manifest file:

android:xlargeScreens="true"

I get this error:

error: No resource identifier found for attribute 'xlargeScreens' in package 'android'

This is my manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="cro.perger.bonbon"
      android:versionCode="5"
      android:versionName="1.4">
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="11" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".bonbon"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

            <!-- Broadcast Receiver that will process AppWidget updates -->
        <receiver android:name=".HelloWidget" android:label="@string/w_name">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
                </intent-filter>
        <meta-data android:name="android.appwidget.provider"
            android:resource="@xml/hello_widget_provider" />
        </receiver>

        <receiver android:name=".SMSReceiver">
            <intent-filter>
                <action android:name="android.provider.Telephony.SMS_RECEIVED" />
            </intent-filter>
        </receiver>    

        </application>
        <supports-screens android:resizeable="true"
                      android:smallScreens="true"
                      android:normalScreens="true"
                      android:largeScreens="true"
                      android:xlargeScreens="true"
                      android:anyDensity="true"/>
    <uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
    <uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
    <uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
    <uses-permission android:name="android.permission.INTERNET"></uses-permission> 
    <uses-permission android:name="android.permission.READ_SMS"/>
</manifest>

What should I do?

like image 846
Goran Avatar asked Aug 08 '11 15:08

Goran


2 Answers

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

like image 118
Sunil Kumar Sahoo Avatar answered Oct 24 '22 07:10

Sunil Kumar Sahoo


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?

like image 22
magicman Avatar answered Oct 24 '22 06:10

magicman