Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
192 views
in Technique[技术] by (71.8m points)

manifest - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...