Closed AnhTu6610 closed 1 year ago
Hi @AnhTu6610, Thanks for filing the issue. When filing issues please try to fill some or all of the information requested in the issue template. To investigate the issue further please share the output of flutter doctor -v
and add some description and steps to reproduce the issue.
Also make sure you are using the correct ad units id.
Hi @AnhTu6610, Thanks for filing the issue. When filing issues please try to fill some or all of the information requested in the issue template. To investigate the issue further please share the output of
flutter doctor -v
and add some description and steps to reproduce the issue. Also make sure you are using the correct ad units id.
flutter doctor -v
[β] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-x64, locale en-VN)
β’ Flutter version 2.2.3 at /Users/mbprolt85/flutter
β’ Framework revision f4abaa0735 (10 weeks ago), 2021-07-01 12:46:11 -0700
β’ Engine revision 241c87ad80
β’ Dart version 2.13.4
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
β’ Android SDK at /Users/mbprolt85/Library/Android/sdk
β’ Platform android-30, build-tools 30.0.3
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
β Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[β] Xcode - develop for iOS and macOS
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 12.5.1, Build version 12E507
β’ CocoaPods version 1.11.0.rc.1
[β] Chrome - develop for the web
β’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[β] Android Studio (version 4.2)
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/9212-flutter
β’ Dart plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/6351-dart
β’ Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
[β] VS Code (version 1.60.0)
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 3.26.0
[β] Connected device (1 available)
β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 93.0.4577.63
@AnhTu6610 Please make sure you are using the correct ad unit ids does the ad load with test unit ids? Also what version of the ads plugin are you having issues with? Can you share a minimal reproducible code?
i am using test unit ids and google_mobile_ads: ^0.13.4
Is this issue on Android/ IOS / both? with all types of ads or specific ad? can you please try running this code sample and also please go through the docs and make sure you satisfy the Prerequisites.
i use ad unit ids it works, but using test unit ids it doesn't work. Only error on ios
@AnhTu6610, please share a reproducible code sample or a git repo to further investigate the issue. And also which IOS device are you having issues with?
Having same issue with test ad unit ids
Exactly the same here. I have the interstitials working but the banner ones launch this error π’
In addition, just in case, I added -ObjC
to my Other Linker Flags
setting. Is it really needed? While this error says `Remember to link...", the readme says nothing about it.
I can't reproduce the issue the interstitial and banner ads both work fine for me with test Ids. Labeling this issue as a bug for further investigation.
cc: @jjliu15
Hello @maheshmnj! In case you need, I could do a call to showcase the issue :)
@rocboronat, sure please that would be much helpful.
@maheshmnj I'll drop you a line on Twitter π¦
In case you need, I could do a call to showcase the issue :)
Ohh, sorry I did not construe it as an actual call, Probably that's not required, you could just share more details here in the thread so that it helps the team members working on this issue.
flutter run -v
(as a text file)screenshot /videos if required.
Thanks
Same situation here, any solution?
Same situation here, any solution?
Using iOS 15 simulator.
Flutter sdk: '>=2.12.0 <3.0.0'
google_mobile_ads: 0.13.5
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
http: 0.13.3
share: 2.0.4
transparent_image: 2.0.0
url_launcher: 6.0.11
fluro: 2.0.3
flutter_launcher_icons: 0.9.2
cupertino_icons: 1.0.3
google_mobile_ads: 0.13.5
firebase_messaging: 10.0.7
shared_preferences: 2.0.8
fluttertoast: 8.0.8
glassmorphism: 3.0.0
flutter_blurhash: 0.6.0
sortedmap: 0.5.1
json_annotation: 4.1.0
flutter_card_swipper: 0.4.0
scrollable_positioned_list: 0.2.0-nullsafety.0
youtube_player_iframe: ^2.2.2
shimmer: 2.0.0
cached_network_image: ^3.1.0
Same situation. And I noticed that my ad was disabled because I haven't received PIN. Is this related to this issue? ( I'm going to apply resending PIN )
Below is my Admob home.
For me is working on Android but not on iOS
@AnhTu6610 is this issue resolved?
I still have this issue with version 1.0.1.
I think its good to leave this issue open until we are sure that this is fixed.
I'm getting this error as well.
This is the log running in xcode:
2021-12-14 23:02:36.160970+0100 Runner[61261:8949445] <Google> To get test ads on this device, set: Objective-C GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ kGADSimulatorID ]; Swift GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ kGADSimulatorID ] 2021-12-14 23:02:36.760970+0100 Runner[61261:8950164] [boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics 2021-12-14 23:02:36.846160+0100 Runner[61261:8950163] <Google> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target. 2021-12-14 23:02:36.926166+0100 Runner[61261:8950189] [boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics 2021-12-14 23:02:36.928422+0100 Runner[61261:8950189] [boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics 2021-12-14 23:02:36.953325+0100 Runner[61261:8950166] <Google> Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target. 2021-12-14 23:02:36.965590+0100 Runner[61261:8949756] flutter: Ad failed to load: ca-app-pub-3940256099942544/2934735716, LoadAdError(code: 8, domain: com.google.admob, message: Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target., responseInfo: ResponseInfo(responseId: fBS5YaT5O4mrtwfqk7GYDQ, mediationAdapterClassName: null, adapterResponses: [AdapterResponseInfo(adapterClassName: com.google.DummyAdapter, latencyMillis: 1), description: { Credentials = { }; Error = "Error Domain=com.google.admob Code=8 \"Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.\" UserInfo={NSLocalizedDescription=Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.}"; Latency = "0.001"; Network = "com.google.DummyAdapter"; }, credentials: { }, adError: AdError(code: 8, domain: com.google.admob, message: Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.))])).
No Ads are shown.
If I change the Bundle Identifier in xcode (ie: by adding a 1 at the end) and run the project ads are shown. Unfortunately this will not work for me since changing the bundle identifier is a no go for me.
pod 'Google-Mobile-Ads-SDK' FirebaseAnalytics/AdIdSupport (8.9.1) Firebase (8.9.1):
Xcode -Version 12.4 (12D4e) iPad Simulator -12.9 inch 3rd Generation
I'm having this issue with banner ad testAdID units when rotating on an iPad to landscape. For example in Portrait the test ad shows and works fine but once I rotate the iPad to landscape I get
Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.
The odd thing is once I rotate back to portrait the ad appears.
This process is non-stop. The ad always shows in portrait but nothing shows in landscape with the same above error message
I looked in Target
> Build Settings
> All
> Other Linker Flags
and it was already set to Obj-C
code:
// called in ViewDidLoad
func initializeAdMob() {
let adMobKey = "ca-app-pub-3940256099942544/2934735716"
bannerView.adUnitID = adMobKey
bannerView.rootViewController = self
bannerView.delegate = self
let adSize = GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(frame.size.width)
bannerView.adSize = adSize
view.addSubview(bannerView)
bannerView.heightAnchor.constraint(equalToConstant: 50).isActive = true
bannerView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
bannerView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
bannerView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -15).isActive = true
bannerView.load(GADRequest())
}
Answer to my issue is here. I just had to use my real ad unit id for it work
Answer to my issue is here. I just had to use my real ad unit id for it work
I was using the real ad unit all the time and also getting this issue on published app
[β] Flutter (Channel stable, 2.8.1, on macOS 11.6.1 20G224 darwin-x64, locale en-GB)
β’ Flutter version 2.8.1 at /Users/dani/development/flutter
β’ Upstream repository https://github.com/flutter/flutter.git
β’ Framework revision 77d935af4d (6 days ago), 2021-12-16 08:37:33 -0800
β’ Engine revision 890a5fca2e
β’ Dart version 2.15.1
[β] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
β’ Android SDK at /Users/dani/Library/Android/sdk
β’ Platform android-Sv2, build-tools 30.0.3
β’ Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
β’ Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
β’ All Android licenses accepted.
[β] Xcode - develop for iOS and macOS (Xcode 13.1)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ CocoaPods version 1.11.2
[β] Chrome - develop for the web
β’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[β] Android Studio (version 2020.3)
β’ Android Studio at /Applications/Android Studio.app/Contents
β’ Flutter plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/9212-flutter
β’ Dart plugin can be installed from:
π¨ https://plugins.jetbrains.com/plugin/6351-dart
β’ Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[β] VS Code (version 1.62.0)
β’ VS Code at /Users/dani/Desktop/Visual Studio Code.app/Contents
β’ Flutter extension version 3.28.0
[β] Connected device (2 available)
β’ iPhone 11 (mobile) β’ 6CF40450-67B5-4597-9CAB-7F0A33CB8453 β’ ios β’ com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 96.0.4664.110
β’ No issues found!
This issue was created almost 4 months ago. Any solution so far? This is showing no ads for me on iOS
I had the same problem. I found this thread while googling a solution. I got it working now. I hope this helps you out. In my case im using xcode, swift. Im sorry, i dont use flutter but maybe some of you might have an idea how to apply my solution to flutter.
Basically the information of the site below helped a lot. https://developers.google.com/admob/ios/test-ads#enable_test_devices
you have 2 options.
1) If you are using app-ads.txt of admob then you have to add this line the file.
google.com, pub-3940256099942544, DIRECT, f08c47fec0942fa0
Then you will get the test ads working as soon as admob confirm your new app-ads.txt.
2) add your device as a test device in admob (i think you already did it). Then check the error logs and find this part
<Google> To get test ads on this device, set:
Objective-C
GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ @"ca45365ebb00dc64001d5c16f7db427eb" ];
Swift
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ @"ca45365ebb00dc64001d5c16f7db427eb" ]
Im using swift, so i added Swift part to AppDelegate as below (be sure that the serial number that you got in the log is set as testDeviceIdentifier and not the number im writing in this example )
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
GADMobileAds.sharedInstance().requestConfiguration.testDeviceIdentifiers = [ "ca45365ebb00dc64001d5c16f7db427eb" ]
return true
}
Finally, be sure you have all the ad networks are set (Info.plist in my case). This document tells you how to do it https://developers.google.com/admob/ios/quick-start
Weβre closing this issue due to inactivity. If youβre still impacted, please create a new issue via the Developer Forum.