When using a test ad unit I get "no ad config" on AdMob

956 Views Asked by At

I've setup AdMob on Android to load a test ad unit ca-app-pub-3940256099942544/2247696110, this used to work fine before but now I'm getting an error. I think it is related to app-ads.txt, which is configured fine for my own ads but maybe it fails on the test ad units? Is there a way to get around this when using MoPub to mediate?

{
  "Code": 3,
  "Message": "No ad config.",
  "Domain": "com.google.android.gms.ads",
  "Cause": "null",
  "Response Info": {
    "Response ID": "null",
    "Mediation Adapter Class Name": "",
    "Adapter Responses": []
  }
}
4

There are 4 best solutions below

0
casolorz On BEST ANSWER

I believe this solves the issue https://developers.google.com/admob/android/test-ads

You have to add an entry to your app-ads.txt

1
Alan Kurniadi On

you just need to change the package name in build.gradle (app)

defaultConfig {
        applicationId "com.yourpacket.name"
1
Youssef Gad On

Solution 1 : You should add a test device to your admob account to see ads on your phone.

Solution 2 : Change package name of your app

defaultConfig {
    applicationId "com.yourpacket.name"
0
Saurav Singh On

If your app package name is exist in playstore then ad will now show it will give this error

To solve this error please change your package name.

Note: It may also happen someone already claimed given package name and that person's app is unpublished.