'no ad config with error code 3 in test ads

I have integrated AdMob into my android app and I am using test id to show ads. but whenever I run the app it always goes to onAdFailedToLoad method and I am getting this in response :

{
      "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": []
      }
    }

so I have created a new android project and I integrated the AdMob into the new project and it works fine. it shows ads perfectly.

packge name (Old Project) : com.mtapps.testapp1 (Ads not showing)
packge name (New Project) : com.mtapps.testapp2 (Ads showing)

but I change the package name of this new project (com.mtapps.testapp2) with my older project's package name (com.mtapps.testapp1) then it shows the same error.

so i think that problem is with package name (com.mtapps.testapp1)

how to solve this?



Solution 1:[1]

It can be a problem with your build varĂ­ant or flavour. So simply change it (or modify your build.gradle) and it should be displaying fine.

At least that was in my case.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 qbi