I am trying to load Admob Native ads. Previously (before app was updated) ads used to show but now they are not showing. I have posted the code, xml and the Logcat below.
There is no fault in your code. It's all good. You just need to wait a little. Your ad id is newly created so it will take some time to fetch ads from google servers. You can verify this by adding banner/interstitial ad id you creating for earlier applications and you'll see that they work. So give it some time and it will work soon. At least for me, it happens all the time. Can't surely say for you but why not give it a try?
From the Documentation, Error code 0 means Internal error.
public static final int ERROR_CODE_INTERNAL_ERROR
Something happened internally; for instance, an invalid response was received from the ad server.
Constant Value: 0
This error generally occurs in newly created ads. So wait for few hours for the ads to be loaded.
So I had the same error, I have tried everything listed here first.
Waiting for google to send me an email saying AdMob is active. Done, it took about an hour, in fact, if you log in it will give you the status, then I waited for 48~ hours, and still the same issue
The payment setup was not an issue for me because I got paid from an associated AdSense account before.
Then I read all the possible common setup issues that other users here had. I mostly used the sample Admob App ID
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~3347511713"/>
And the Sample ad Unit Id given on the Admob getting started page, this way you eliminate issues with your account during development.
build.gradle
of their sample, matching what I got to theirs, just updating and adding my dependencies. then I found it, as soon as I went to targetSdkVersion 30
and compileSdkVersion 30
the error arises. so, for now, I'm on SDK 29, till they fix this. I hope some found this usefulEdit: The issue is reported to google check the status here, and here. it seems to affect Java and Kotlin
You can always run your project on emulator and you will get information about "emulated ad" in your applicaiton
When it works with the sample ad unit Ids your account probably just is not approved yet. Have you created it just now?
Test ads worked right away for me. I had to wait several hours for the "Great news – your account is now approved" mail until my ads worked too. Do not use your own ads for development anyway - you can get your AdMob account blocked for that!
So as soon as the test ads work and you have confirmed that the correct IDs are used for release build you most probably have done everything right and just have to wait
There is also an test App ID "ca-app-pub-3940256099942544~3347511713" but I had no problem to use my own App ID right after creating it.
I got this problem on my emulator API 30. I don't know why.