title: Android adMob : ads not showing (tried everything)
body: <p>I have an issue with AdMob ads not showing in my test app on a physical devices. I've pretty much browsed all similar questions here, no luck. So I have the classic AdView declaration in my xml : </p>
  
  <pre><code>&lt;com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
           android:id="@+id/adView"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           ads:adUnitId="my_actual_publisher_id"
           ads:adSize="BANNER"/&gt;
  </code></pre>
  
  <p>My Manifest contains needed permissions, ads activity and Google Play Services :</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  
  &lt;activity android:name="com.google.android.gms.ads.AdActivity"
      android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/&gt;
  
  
      &lt;meta-data
                  android:name="com.google.android.gms.version"
                  android:value="@integer/google_play_services_version" /&gt;
  </code></pre>
  
  <p>I made sure that there was enough space for my ad : I put it in a TableRow, and next TableRow in line has enough space to show. The space "reserved" for my AdView is consistent with what I would expect.</p>
  
  <p>In the corresponding fragment onCreate(), I request a new ad (I've debugged that piece of code, it is correctly executed) :</p>
  
  <pre><code>AdView adView = (AdView) result.findViewById(R.id.adView);
  AdRequest adRequest = new AdRequest.Builder().addTestDevice("my_real_device_id").build();
      adView.loadAd(adRequest);
  </code></pre>
  
  <p>My AdMob dashboard doesn't show any request ... what did I do wrong ? Thanks</p>
  
  <p>EDIT : a strange fact maybe worth mentioning : I tried to move the TableRow containing my ad upwards in the TableLayout, just in case it was a matter of rendering space or similar. I now have class cast exception when I try to programmatically get a View that used to be <em>before</em> my ad, and which is now <em>after</em> :</p>
  
  <p>Button clearButton = (Button) view.findViewById(R.id.clearButton);</p>
  
  <p>In my activity.onCreate() I was doing the code above to perform some initialization, this code now fails with exception :</p>
  
  <p>java.lang.ClassCastException: android.widget.TableRow cannot be cast to android.widget.Button</p>
  
  <p>It is as if my R class was not recompiled, and its pointers leading to wherever !!!???</p>