簡體   English   中英

android:largescreens的無效屬性值語法:=“ true”

[英]Invalid attribute value syntax for android:largescreens: = “true”

我正在用11的minSdkVersion和17的targetSdkVersion開發一個Android應用程序。我正在為多種屏幕尺寸設計此應用程序。 所以我將所有屏幕的支持都放在清單文件中。我希望該應用程序支持所有密度。

我的Manifest.xml代碼:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.sample"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="17" />


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

    <application
        android:debuggable="true"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:name="CommApp" >


        <activity
            android:name="com.example.android.sample.MainActivity"
            android:label="@string/app_name" 
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
          <activity android:name="HomePage"
              android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
               android:screenOrientation="portrait"></activity>

          <activity android:name="Registering"
              android:screenOrientation="portrait"
              ></activity>

         <activity android:name="ListviewActivity"
              android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
             android:screenOrientation="portrait"></activity>



    </application>

</manifest>

我為所有屏幕尺寸創建了布局文件夾,如res / layout-small,res / layout-normal,res / layout-large,res / layout-xlarge。 我想在屏幕尺寸為720x1280的模擬器中運行此應用程序,為此設備我在res / layout-xlarge文件夾中創建了所有布局文件。 但是在運行時會顯示以下錯誤:

Invalid attribute value syntax for android:largescreens: = "true"
            android:xlargeScreens="true"
            android:anyDensity="true"/

不知道怎么了? 誰能告訴我解決方案。 提前致謝。

似乎在抱怨android:largeScreens屬性中=符號后面的空格。 嘗試刪除多余的空間。

我的屬性格式如下:

  <supports-screens android:smallScreens            = "false"
                    android:normalScreens           = "false"
                    android:largeScreens            = "false"
                    android:xlargeScreens           = "true"
                    android:requiresSmallestWidthDp = "720" />

錯誤:

update-manifest:
     [exec] Invalid attribute name: android:smallscreens            

刪除等號周圍的空格將其固定。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM