Admob with Android: unable to parse android:configChanges in manifest

Deadly 提交于 2019-12-23 09:34:07

问题


I am trying to add ads to my Android app using Admob, but have hit a brick wall. Admob says it requires the following from logcat

E/Ads     (26043): The android:configChanges value of the com.google.ads.AdActivity must include uiMode.
E/Ads     (26043): The android:configChanges value of the com.google.ads.AdActivity must include screenSize.
E/Ads     (26043): The android:configChanges value of the com.google.ads.AdActivity must include smallestScreenSize.

However, the Android SDK in Eclipse on Ubuntu fails to be able to parse the following,

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

When I go to the activity and select the attribute in the manifest, the last three items show 'Unrecognized flag'.

I want to add ads in on Android 1.6 (API level 4), but these attributes don't exist until API levels in the teens. How do I reconcile this?


回答1:


The AdMob SDK v4.3.1 was released late last night. The SDK requires these new configChanges for tablet optimization, but these configChanges are only available in Honeycomb and above.

You will need to download Android SDK Version 3.2 or above, and then set target=13 or above in your project.properties file to compile against the new SDK version. It will still support Android 1.5 devices and above, and that can be controlled by the minSdkVersion in your manifest.



来源:https://stackoverflow.com/questions/7885986/admob-with-android-unable-to-parse-androidconfigchanges-in-manifest

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!