Reputation: 949
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?
Upvotes: 1
Views: 804
Reputation: 4217
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
Upvotes: 2
Reputation: 949
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.
Upvotes: 2