title: Maps Android V2: java.lang.noclassdeffounderror: com.google.android.gms.R$styleable
body: <p>As many I get the following error: <code>java.lang.noclassdeffounderror: com.google.android.gms.R$styleable</code> when trying to implement Maps for Android V2.</p>
  
  <p>Somehow I must be missing what I exactly am doing wrong, since it's not working. What I tried first is to copy the google-play-services.lib into the lib folder, but I saw somewhere I shouldn't do this.</p>
  
  <p>Then I tried to import addon-google_apis-google-8 as a project, but the project gives the error <code>The import com.google cannot be resolved.</code></p>
  
  <p>I'm following the <a href="http://www.vogella.com/articles/AndroidGoogleMaps/article.html" rel="nofollow">Vogella Tutorial</a>:</p>
  
  <p>Activity: </p>
  
  <pre><code>SupportMapFragment fm = (SupportMapFragment)   getSupportFragmentManager().findFragmentById(R.id.map);
          map = fm.getMap();
  
           //map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
                  Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG)
                      .title("Hamburg"));
                  Marker kiel = map.addMarker(new MarkerOptions()
                      .position(KIEL)
                      .title("Kiel")
                      .snippet("Kiel is cool")
                      .icon(BitmapDescriptorFactory
                          .fromResource(R.drawable.btn_logo)));
  
                  // Move the camera instantly to hamburg with a zoom of 15.
                  map.moveCamera(CameraUpdateFactory.newLatLngZoom(HAMBURG, 15));
  
                  // Zoom in, animating the camera.
                  map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
  </code></pre>
  
  <p>Manifest:</p>
  
  <pre><code> &lt;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="17" /&gt;
  
      &lt;permission
          android:name="com.testmap.test.permission.MAPS_RECEIVE"
          android:protectionLevel="signature" /&gt;
  
      &lt;uses-permission android:name="com.testmap.test.permission.MAPS_RECEIVE" /&gt;
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /&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.permission.WRITE_SETTINGS" /&gt;
     uses-permission android:name="android.permission.INTERNET" /&gt;
     &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
       &lt;uses-feature
          android:glEsVersion="0x00020000"
          android:required="true" /&gt;
  
                &lt;meta-data
              android:name="com.google.android.maps.v2.API_KEY"
              android:value="a_real_api_key" /&gt;
      &lt;/application&gt;
  </code></pre>
  
  <p>I retrieved a_real_api_key by entering the SHA1 retrieved by installing the <a href="http://keytool.sourceforge.net" rel="nofollow">keytool</a> plugin.. <a href="http://keytool.sourceforge.net/update" rel="nofollow">http://keytool.sourceforge.net/update</a> fingerprint;com.testmap.test in the google console.</p>
  
  <p>And xml:</p>
  
  <pre><code> &lt;fragment
          android:id="@+id/map"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          class="com.google.android.gms.maps.SupportMapFragment" /&gt;
  </code></pre>
  
  <p>I have the feeling I need to import the google-play-services library, can somebody tell me step by step how to do this in Eclipse, I've followed many answers, but I seem to do something wrong every time.</p>