So I was working with AdMob and implemented a Banner and Interstitial ad. Waited more than a day but ads are not showing. It says failed to load ad : 3
The log:
12-17 19:20:33.680 16280-16512/in.shantanupatil.wamanagement I/Ads: App measurement is starting up, version: 13001
To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
12-17 19:20:33.825 16280-16280/in.shantanupatil.wamanagement
D/DynamitePackage: Instantiating
com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl
12-17 19:20:35.376 16280-16280/in.shantanupatil.wamanagement D/WebView:
addJavascriptInterface=googleAdsJsInterface
12-17 19:20:35.899 16280-16466/in.shantanupatil.wamanagement W/Ads: Got on
activity created
12-17 19:20:37.642 16280-16466/in.shantanupatil.wamanagement W/Ads: Got on
activity created
12-17 19:20:40.721 16280-16466/in.shantanupatil.wamanagement W/Ads: Got on
activity created
12-17 19:20:40.904 16280-16280/in.shantanupatil.wamanagement I/Ads: Use
AdRequest.Builder.addTestDevice("34A6512246BC64A9B8DC766FD114D5D5") to get
test ads on this device.
12-17 19:20:41.056 16280-16802/in.shantanupatil.wamanagement W/Ads: Invoke
Firebase method getInstance error.
12-17 19:20:41.057 16280-16802/in.shantanupatil.wamanagement W/Ads: The
Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase
integration requires the latest Firebase SDK jar, but Firebase SDK is either
missing or out of date
12-17 19:20:42.357 16280-16280/in.shantanupatil.wamanagement I/Ads: Ad
failed to load : 3
The code I used to
private AdView adView;
adView = (AdView) findViewById(R.id.detail_draft_admob);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
The gradle I have included
implementation 'com.google.android.gms:play-services-ads:17.1.1'
Also, I added the app id in the manifest. The add seems not to work. What am I doing wrong?
Check this link it's not your fault.
I have same problem and it's solution is increase you app user so send ad request to admob and show your ad.
It's rule is latest rule and admob privacy make strong so apply this rule
Before 2017 it's rule is not so ad show is work fine, but right now first to send some ad request than ad show
I hope solve your question.
When apps are newly registered with AdMob, it takes some time and a few ad requests to allow inventory to build. Because of this, you may not see live impressions immediately.
I think.. maybe it's not your fault.
AdMob has some problem since a few months ago.
reference below links.
Many people are having the same problem. (Even AdMob seems to think they have a problem.)
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/rTfuhBjGkpc
https://productforums.google.com/forum/#!msg/google-admob-help-forum/8oc3pebOrFw/EicKPpUVDgAJ
Related
I am trying to release a new version of my app.
The older version can still display ads, but my newer version (release build, not debug)
cannot show ads. I am getting the following error:
2020-03-03 01:54:42.351 7098-7098/? I/Ads: Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("457B729F085881806B918663EF07468C") to get test ads on this device.
2020-03-03 01:54:42.442 3275-7238/? W/Ads: App does not have the required permissions to get location
2020-03-03 01:54:42.517 3275-7485/? I/Ads: SDK version: afma-sdk-a-v20088999.19649000.1
2020-03-03 01:54:43.174 7098-7098/? I/Ads: Ad failed to load : 3
Any way to tell the Admob SDK that the current build is a release build?
one more step you can do,
as you see in your log this code Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("457B729F085881806B918663EF07468C") to get test ads on this device.
with your device id is: 457B729F085881806B918663EF07468C
now before intilization you can add the following:
RequestConfiguration configuration = new RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("457B729F085881806B918663EF07468C")).build();
MobileAds.setRequestConfiguration(configuration);
any body else reading this solution should change the device ID.
reference here
Short answer: just wait for some hours till people start downloading and using the app.
Actually the log messages don't mean that I had to run test ads. It seems admob was not just showing ads until some people downloaded my app and started using it.
Once I published the update, I had to wait for 6-7 hours after which ads started showing.
I'm trying to implement a rewarded ad using google dev guides here and here , the ad shows up and the callbacks are called normally when using the test ad-unit ca-app-pub-3940256099942544/5224354917 on the emulator , then I replaced the test ad unit with mine, launched on a physical device, the ad doesn't load up and function onRewardedVideoAdFailedToLoad is called.
in the log I found
GoogleService failed to initialize, status: 10, Missing google app id value from string resources with name google_app_id.
I went on and created a firebase account just to download google-services.json and get the mobilesdk_app_id, then I added it to the Strings resources. Now when it launches the ad fails to load again, and I found this in the log
Disabling data collection. Found google_app_id in strings.xml but Google Analytics for Firebase is missing. Remove this value or add Google Analytics for Firebase to resume data collection.
I'm using com.google.gms:google-services:4.3.0
I couldn't find anything in the guide to help
Did you add add
apply plugin: 'com.google.gms.google-services'
to the bottom of your modules build.gradle?
You app_id needs to go to your AndroidManifest.xml as well
<manifest>
<application>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
</application>
</manifest>
see here: https://developers.google.com/admob/android/quick-start#update_your_androidmanifestxml
I have followed the official documentation but ads are not loading. I am not sure about the reason, recently I just updated Google AdMob library dependency version to: play-services-ads:17.1.2
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
testImplementation 'junit:junit:4.12'
implementation 'com.google.android.gms:play-services-ads:17.1.2'
Now getting the following errors in logcat when the application tries to load ad:
2018-12-18 18:04:28.943 17372-17387/? W/Ads: Got on activity created
2018-12-18 18:04:29.032 17372-17372/? D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraMobileAdsSettingManagerCreatorImpl
2018-12-18 18:04:29.034 17372-17390/? I/Ads: App measurement is starting up, version: 13001
2018-12-18 18:04:29.034 17372-17390/? I/Ads: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2018-12-18 18:04:29.115 17372-17372/? I/Ads: Updating ad debug logging enablement.
2018-12-18 18:04:29.522 17372-17372/? I/Ads: Use AdRequest.Builder.addTestDevice("77F7E3A565B98A8D3C5B4E341A1D1AF2") to get test ads on this device.
2018-12-18 18:04:29.728 17372-17451/? W/Ads: Invoke Firebase method getInstance error.
2018-12-18 18:04:29.728 17372-17451/? W/Ads: The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date
2018-12-18 18:04:29.825 17372-17396/? W/Ads: Update ad debug logging enablement as false
2018-12-18 18:04:30.165 17372-17445/? W/Ads: Not retrying to fetch app settings
2018-12-18 18:04:30.194 22607-16822/? W/Ads: App does not have the required permissions to get location
2018-12-18 18:04:30.252 22607-17504/? I/Ads: SDK version: afma-sdk-a-v14799021.14300000.1
2018-12-18 18:04:31.507 17372-17372/? I/Ads: Ad failed to load : 3
Test ads are showing fine in real device and emulator. However, my app has nothing to do with GPS location, so I have not invoke runtime permissions for obtaining location updates.
I'm trying to integrate fb native ads in android but its giving me error every time I try to fetch an ad.
When I log the error its showing error code as -1 and unknown message
I have followed full documentation from https://developers.facebook.com/docs/audience-network/android/nativeadsmanager while integrating but couldn't find any solution
Thanks
May be you are using the wrong dependency. Replace the following dependency (or whatever number you have before :+:
implementation 'com.facebook.android:audience-network-sdk:5.+'
with
implementation 'com.facebook.android:audience-network-sdk:5.0.1'
I am using Eclipse and I try to show ads via the Facebook Audience Network. I have added the "AudienceNetwork.jar" from the official Facebook SDK, and the "FacebookAdapter.jar" from the AdMob Mediation Networks.
I should mention that I monetize via the AdMob and do not use proguard.
My problem is that when I try to load ads, I get the following error:
02-19 20:07:35.315: I/Ads(23957): Instantiating mediation adapter: com.google.ads.mediation.facebook.FacebookAdapter
02-19 20:07:35.316: I/dalvikvm(23957): Failed resolving Lcom/google/ads/mediation/facebook/FacebookAdapter; interface 1798 'Lcom/google/android/gms/ads/mediation/MediationInterstitialAdapter;'
02-19 20:07:35.316: W/dalvikvm(23957): Link of class 'Lcom/google/ads/mediation/facebook/FacebookAdapter;' failed
02-19 20:07:35.316: W/Ads(23957): Could not instantiate mediation adapter: com.google.ads.mediation.facebook.FacebookAdapter. com.google.ads.mediation.facebook.FacebookAdapter
According to this and this post, this should happen only if I used proguard, which I don't.
Does anyone has a suggestion on why this happens?
And why doesn't the Facebook itself have any documentation on how to integrate the Audience Network via AdMob, since the first is supported by the latter one? :-)
It doesn't look like com/google/ads/mediation/facebook/FacebookAdapter is contained within your APK. Check your APK, your build process, how you have added the FacebookAdapter library and the contents of the FacebookAdapter library itself.
I tried with a banner ad. Wanted to load ads from Facebook Audience Networrk through Admob mediation when I ended up with the same error.
Please make sure you added the Google Play Services Lib to your build path and check if your version of the Google Play Services Lib contains the MediationInterstitialAdapter.class and the MediationNativeAdapter.class. Mine did not (still working with eclipse) and so the FacebookAdapter was searching for a class that was not there.
After updating to a newer version (links here: How to download older google play services?) the mediation now works fine for me. :)