不允许在Android的错误字符串类型:清单文件configChanges [英] Error string types not allowed at android:configChanges in manifest file

查看:147
本文介绍了不允许在Android的错误字符串类型:清单文件configChanges的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我的清单文件,该文件显示不允许在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/>


< /舱单>
 

解决方案

<$p$p><$c$c>android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"

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

<一个href="http://developer.android.com/guide/topics/manifest/activity-element.html#config">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

这篇关于不允许在Android的错误字符串类型:清单文件configChanges的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆