title: ADMOB-java.lang.IllegalStateException: isLoaded must be called on the main UI thread
body: <p>I am newbie to android,its my AndroidLauncherjava file for intersial code</p>
  
  <pre><code>       @Override public void onCreate (Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
  
          RelativeLayout layout = new RelativeLayout(this);
          AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
  
  
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                  WindowManager.LayoutParams.FLAG_FULLSCREEN);
          getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
  
          // Create the libgdx View
          View gameView = initializeForView(new MyGdxGame(this),config);
  
  
          AdView adView = new AdView(this);
          adView.setAdUnitId("ca-app-pub-6916351754834612/9855033027");
          adView.setAdSize(AdSize.BANNER);
          adView.loadAd(new AdRequest.Builder()
          .build()); 
  
          layout.addView(gameView);
  
          // Add the AdMob view
          RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
          adParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
          adParams.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
          adView.setLayoutParams(adParams);
          adView.setBackgroundColor(Color.BLACK);
  
          layout.addView(adView, adParams);
  
  
         iAd = new InterstitialAd(this);
          iAd.setAdUnitId(AD_UNIT_ID);
          loadInterstitial();
          iAd.setAdListener(new AdListener() {
              @Override
              public void onAdLoaded() {
                  }
  
              @Override
              public void onAdFailedToLoad(int errorCode) {
  
              }
          });
          setContentView(layout);
         }
  
      public void loadInterstitial() {
          /*AdRequest adRequest = new AdRequest.Builder()
          .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
          .addTestDevice("0FD328B10106BD9B2BE832163D43D085")
          .build();*/
          AdRequest adRequest = new AdRequest.Builder().build();
          iAd.loadAd(adRequest);
  
          //iAd.loadAd(adRequest);
      }
  
      public void showInterstitial() {
          if (iAd.isLoaded()) {
              iAd.show();
          } else {
              //Log.d(TAG, "Interstitial ad is not loaded yet");
          }
      }
  </code></pre>
  
  <p>Its my code for interstitial ads;I getting <code>java.lang.IllegalStateException: isLoaded must be called on the main UI thread</code> .Checked few solution here,couldn't fixed .I got to know iAd is not loading.Can anyone help me, where i went wrong. Thank you in advance</p>