gpt4 book ai didi

c# - Xamarin.Forms AdMob "Missing AdActivity"

转载 作者:太空宇宙 更新时间:2023-11-03 13:12:41 24 4
gpt4 key购买 nike

我在 Xamarin.Forms 项目中实现 AdMob 时遇到问题。

所以当我运行 android 应用程序时,这会显示在输出中:

01-22 16:53:17.351 W/Ads (3529): Missing AdActivity with android:configChanges in AndroidManifest.xml. 
You must have the following declaration within the <application> element:
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

但是我的 Manifest 中有这一行......:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto">
<uses-sdk android:minSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

当我打开包含正在显示的广告的页面时:

enter image description here

这里有什么问题吗?

最佳答案

<activity>标签应在 <application> 内标签

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

关于c# - Xamarin.Forms AdMob "Missing AdActivity",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41793912/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com