2012-06-26 21 views
31

這裏是我的清單文件,它顯示不允許在android:configChanges中的錯誤字符串類型,請幫助我糾正錯誤。下面是 是我的清單文件。錯誤字符串類型不允許在清單文件中android:configChanges

<?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> 
+0

你在找什麼? –

+0

Eclipse中的錯誤爲android:configChanges http://stackoverflow.com/questions/7899767/admob-error-in-eclipse-for-androidconfigchanges – sunil

回答

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

screenSize & smallestScreenSize屬性在SDK 10.They提供API級別引入了13

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

+3

IE,將項目目標更改爲API級別13或以上。 – amit

+2

項目>屬性> Android>將'Project Build Target'更改爲3.2以上。 –

+2

但是...這意味着我的應用程序不會在薑餅,對吧?:-( – Yavierre

6
  • 請確保您有的最新副本Android SDK,並且您至少要針對Android v3.2編譯 (設置目標爲 project.properties到android-13)。
  • Google移動廣告SDK for Android需要Android 2.3或更高版本的運行時(在您的AndroidManifest.xml中將 android:minSdkVersion設置爲至少9)。 這意味着您可以使用最新版本的Android SDK 進行開發,並且您的應用仍然可以在早期的Android版本(至少2.3 )上運行。
相關問題