gpt4 book ai didi

android - AndroidManifest.xml中缺少AdActivity

转载 作者:行者123 更新时间:2023-12-03 04:02:08 29 4
gpt4 key购买 nike

我有这个错误

I/Ads     (21352): Starting ad request.
I/Ads (21352): SDK version: afma-sdk-a-v15090040.14300000.1
I/Ads (21352): This request is sent from a test device.
W/Ads (21352): Could not find com.google.android.gms.ads.AdActivity, please make sure it is declared in AndroidManifest.xml.
W/Ads (21352): 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" />
D/skia (21352): Program linking failed.
D/skia (21352): Program linking failed.

我试图解决此 missing-adactivity-with-android-configchangesAdView - Missing adActivity with android:configChanges in AndroidManifest.xml中提到的问题,但存在相同的问题。

在个人资料/ AndroidManifest中,
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="puns.jokes.org.jokespuns">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

在main / AndroidManifest.xml中
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="puns.jokes.org.jokespuns">

<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="Jokes and Puns"
android:icon="@mipmap/ic_launcher">

<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-<app-id>"/>
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>

我在这里做错了什么?

最佳答案

我收到了同样的错误。

我对这个问题的解决方案是在应用程序级别的grandle版本中进行更新。

classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.google.gms: google-services: 4.2.0'

我的AndroidManifest:
 <meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-***********~**********"/>

希望对您有所帮助。问候

关于android - AndroidManifest.xml中缺少AdActivity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54755080/

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