'Flutter AdMob will not launch
Trying to incorporate adMob into a flutter app and I am having this issue:
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
lib/main.dart:1
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
E/AndroidRuntime(31743): FATAL EXCEPTION: pool-3-thread-1
E/AndroidRuntime(31743): Process: com.tendigitgrid.app_free, PID: 31743
E/AndroidRuntime(31743): java.lang.IllegalArgumentException: com.tendigitgrid.app_free: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E/AndroidRuntime(31743): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
E/AndroidRuntime(31743): at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
E/AndroidRuntime(31743): at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
E/AndroidRuntime(31743): at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
E/AndroidRuntime(31743): at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:174)
E/AndroidRuntime(31743): at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:108)
E/AndroidRuntime(31743): at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:86)
E/AndroidRuntime(31743): at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:75)
E/AndroidRuntime(31743): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(31743): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(31743): at java.lang.Thread.run(Thread.java:920)
ANd it will not launch into the emulator to test.
I have minSDK set to 21 in my gradle file.
Update:
I tried installing the apk on my real phone and not in an emulator and it also did not work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
