不允许在Android的错误字符串类型:清单文件configChanges不允许、字符串、清单、错误

2023-09-12 23:38:50 作者:少年情深似海i

下面是我的清单文件,该文件显示不允许在Android的错误字符串类型:configChanges请帮我改正错误。 下面是我的清单文件。

 < XML版本=1.0编码=UTF-8&GT?;
    <舱单的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    包=com.ifahja.banner
    安卓版code =1
    机器人:VERSIONNAME =1.0>

    <使用-SDK安卓的minSdkVersion =10/>

    <应用
        机器人:图标=@可绘制/ ic_launcher
        机器人:标签=@字符串/ APP_NAME>
        <活动
            机器人:MyBannerActivityNAME =
            机器人:标签=@字符串/ APP_NAME>
            <意向滤光器>
                <作用机器人:名称=android.intent.action.MAIN/>

                <类机器人:名称=android.intent.category.LAUNCHER/>
            &所述; /意图滤光器>
        < /活性GT;

        <活动机器人:名称=com.google.ads.AdActivity
                  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>


    < /用途>

    <使用-权限的Andr​​oid:名称=android.permission.INTERNET对/>
  <使用-权限的Andr​​oid:名称=android.permission.ACCESS_NETWORK_STATE/>


< /舱单>
 

解决方案Android联接错误,Android错误解决方法大集合

android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"

屏幕尺寸&放大器; smallestScreenSize 属性在SDK 10.They提供的API级别引入13。

http://developer.android.com/guide/topics/manifest/activity-element.html#config

Here is my manifest file which shows error string types not allowed at android:configChanges please help me in rectification of the error. below is my manifest file.

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

    <uses-sdk android:minSdkVersion="10"/>

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

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="com.google.ads.AdActivity"
                  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>


    </application>

    <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>


</manifest>

解决方案

android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"

screenSize & smallestScreenSize attributes are not available in SDK 10.They are been introduced in API level 13.

http://developer.android.com/guide/topics/manifest/activity-element.html#config