title: My Admob Ad not showing in my app getting error code 3 "no ad config" how to fix it, also my test ad is working properly
body: <p>//This is my Activity where i want to load my ad</p>
  <pre><code>import androidx.appcompat.app.AppCompatActivity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.AdapterView;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  import android.widget.Toast;
  import com.google.android.gms.ads.AdListener;
  import com.google.android.gms.ads.AdRequest;
  import com.google.android.gms.ads.AdView;
  import com.google.android.gms.ads.InterstitialAd;
  import com.google.android.gms.ads.LoadAdError;
  import com.google.android.gms.ads.MobileAds;
  import com.google.android.gms.ads.initialization.InitializationStatus;
  import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
  
  
  public class TenaliRamanActivity extends AppCompatActivity {
  
      ListView listView;
      private InterstitialAd mInterstitialAd;
      private AdView mAdView;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_tenali_raman);
  </code></pre>
  <p>//AD Code Start</p>
  <pre><code>        MobileAds.initialize(this, new OnInitializationCompleteListener() {
              @Override
              public void onInitializationComplete(InitializationStatus initializationStatus) {
              }
          });
  
          mAdView = findViewById(R.id.adView);
          AdRequest adRequest = new AdRequest.Builder().build();
          mAdView.loadAd(adRequest);
  
          mAdView.setAdListener(new AdListener() {
              @Override
              public void onAdLoaded() {
                  // Code to be executed when an ad finishes loading.
              }
  </code></pre>
  <p>// I am overriding onAdFailedToLoad() method to know why my ad is not showing and getting error code
  3, message &quot;no ad config&quot;</p>
  <pre><code>            @Override
              public void onAdFailedToLoad(LoadAdError adError) {
                  Toast.makeText(TenaliRamanActivity.this, &quot; Banner AdError is &quot;+ adError, 
   Toast.LENGTH_LONG).show();
                  
              }
  
              @Override
              public void onAdOpened() {
                  // Code to be executed when an ad opens an overlay that
                  // covers the screen.
              }
  
              @Override
              public void onAdClicked() {
                  // Code to be executed when the user clicks on an ad.
              }
  
              @Override
              public void onAdLeftApplication() {
                  // Code to be executed when the user has left the app.
              }
  
              @Override
              public void onAdClosed() {
                  // Code to be executed when the user is about to return
                  // to the app after tapping on an ad.
              }
          });
  </code></pre>
  <p>// Interstitial code Start here</p>
  <pre><code>        mInterstitialAd = new InterstitialAd(this);
          mInterstitialAd.setAdUnitId(&quot;ca-app-pub-4745680273727033/3318988209&quot;);
          mInterstitialAd.loadAd(new AdRequest.Builder().build());
  
          mInterstitialAd.setAdListener(new AdListener() {
              @Override
              public void onAdLoaded() {
                  // Code to be executed when an ad finishes loading.
              }
  </code></pre>
  <p>//I also Toasted the my Inetrstitial Ad error message and getting same error code 3, message &quot;no ad config&quot;[my error is this][1]</p>
  <pre><code>            **@Override
              public void onAdFailedToLoad(LoadAdError adError) {
                  Toast.makeText(TenaliRamanActivity.this, &quot; Instertial Ad Error is&quot;+ adError, 
  </code></pre>
  <p>Toast.LENGTH_SHORT).show();
  <code>enter code here</code>}**</p>
  <pre><code>            @Override
              public void onAdOpened() {
                  // Code to be executed when the ad is displayed.
              }
  
              @Override
              public void onAdClicked() {
                  // Code to be executed when the user clicks on an ad.
              }
  
              @Override
              public void onAdLeftApplication() {
                  // Code to be executed when the user has left the app.
              }
  
              @Override
              public void onAdClosed() {
                  // Code to be executed when the interstitial ad is closed.
              }
          });
  
  
         // Start Application Code
          listView= findViewById(R.id.listView);
  
          String[] tenaliRaman= getResources().getStringArray(R.array.tenaliRaman);
  
          ArrayAdapter&lt;String&gt; adapter= new ArrayAdapter&lt;&gt;(this,R.layout.row_item, R.id.rowText, tenaliRaman);
  
          listView.setAdapter(adapter);
  
          listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  if (mInterstitialAd.isLoaded()) {
                      mInterstitialAd.show();
                  } else {
                      Intent intent= new Intent(TenaliRamanActivity.this, StoryTenaliRaman.class);
                      intent.putExtra(&quot;storyPosition&quot;, position);
                      startActivity(intent);
                  }
  
  
  
              }
          });
  
      }
  }
  
  
    [1]: https://i.stack.imgur.com/rNFvv.png
  </code></pre>