у меня эта ошибка
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.
Я попытался решить проблему, как указано в этих отсутствует-адактивность-с-android-configchanges и AdView – отсутствует рекламная активность с android:configChanges в 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'
Мой манифест Android:
<meta-data
android:name = "com.google.android.gms.ads.APPLICATION_ID"
android:value = "ca-app-pub-***********~**********"/>
Я надеюсь, что это помогает. С уважением