title: Admob "The following classes could not be instantiated: - com.google.ads.AdView" for Admob 6.0.1 running 2.3.3
body: <p>I have a 2.3.3 android app that I am developing that I would like to add Admob ads onto. The admob ads version is 6.0.1. I follow the directions on googles site to add it and it does not seem to work properly for 2.3.3, and assumed working correctly for 4.0.3. I am developing against for the goal of releasing a 2.3.3 version to support Blackberry playbook and most android devices out there.</p>
  
  <p>When I add everything to the android manifest, with the added being:</p>
  
  <pre><code>&lt;activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET"/&gt;   
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  
  &lt;uses-sdk android:minSdkVersion="10" /&gt;
  </code></pre>
  
  <p>With the build path external jar pointing to the android adk path to google admob then the jar in there and then adding this to the XML file:</p>
  
  <p>Up top:</p>
  
  <pre><code>xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
  </code></pre>
  
  <p>And down in the XML layout:</p>
  
  <pre><code>&lt;com.google.ads.AdView android:id="@+id/adView"
                               android:layout_width="wrap_content"
                               android:layout_height="wrap_content"
                               ads:adUnitId="I put my id here"
                               ads:adSize="BANNER"
                               ads:testDevices="TEST_EMULATOR"
                               ads:loadAdOnCreate="true"/&gt;
  </code></pre>
  
  <p>It comes up with the error on the graphical layout on the 2.3.3 gui designer stating:</p>
  
  <p>"The following classes could not be instantiated:
  - com.google.ads.AdView (Open Class, Show Error Log)
  See the Error Log (Window > Show View) for more details."</p>
  
  <p>When I open the class it says it cant see the source.</p>
  
  <p>If I change the GUI designer to be 4.0.3 (as you need to target this apparently to compile) then the admob shows up in a black box and seems ok. I need it working for 2.3.3 though and I seem to crash instantly now when I load this app in the 2.3.3 emulator.</p>
  
  <p>Any help? I read that this should be able to be used in 2.3.3 so I don't understand why. I had a libs folder but I took it out and just externally references the JAR.</p>
  
  <p>Thanks.</p>