title: ClassCastException when trying to get Google Play Services Map v2 to display
body: <p>I've been beating me head against a wall with this for a few days now.  I've read just about every post I can on the topic and nothing seems to get me across the finish line.</p>
  
  <p>Trying to build an app using the Google Play Services Map v2 API.</p>
  
  <p>I've got the API key, no problem.</p>
  
  <p>Here are my bits:  MainActivity.java</p>
  
  <pre><code>public class MainActivity extends FragmentActivity
  {
  
      GoogleMap googleMap;
  
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());
          if ( status==ConnectionResult.SUCCESS)
          {
              SupportMapFragment supportMapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
              googleMap = supportMapFragment.getMap();
          }
          else
          {
              int requestCode = 10;
              Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, this, requestCode);
              dialog.show();
          }
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu)
      {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
  }
  </code></pre>
  
  <p>activity_main.xml:</p>
  
  <pre><code>&lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools" 
        android:id="@+id/map"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:name="com.google.android.gms.maps.MapFragment"/&gt;
  </code></pre>
  
  <p>Relevant manifest:</p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="11"
      android:targetSdkVersion="17" /&gt;
  
  &lt;permission
      android:name="com.mcdaniel.mmm4.permission.MAPS_RECEIVE"
      android:protectionLevel="signature" /&gt;
  
  &lt;uses-permission android:name="com.mcdaniel.mmm4.MAPS_RECEIVE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.persmission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.persmission.ACCESS_NETWORK_STATE" /&gt;
  &lt;uses-permission android:name="android.persmission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt;
  
  &lt;meta-data
      android:name="com.google.android.maps.v2.API_KEY"
      android:value="MY API KEY" /&gt;
  
  &lt;uses-feature
      android:glEsVersion="0x00020000"
      android:required="true" /&gt;
  </code></pre>
  
  <p>I've got past the NoClassDefFound error involving R$styleable, and ClassNotFound of the maps class, but I cannot get past this one.</p>
  
  <p>Regarding the class, I've tried a couple different implementations without luck.  This one seems the most explicit.  No compile warnings.</p>
  
  <p>My target is android-17 with min of android-11.  I've got the library imported (with copy files option), and referenced by my project, and exported too.  </p>
  
  <p>Obviously there's something I'm missing.  Please help!</p>
  
  <p>Thanks,
  David</p>