title: Embedding google maps android v2 in android
body: <p>i created application in android 2.33 . i used apk v2 keys and i followed all the steps but still its showing error</p>
  
  <pre><code>**xml**
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/map"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  class="com.google.android.gms.maps.MapFragment" /&gt;
  
  
  **Mainfest**
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.Maps.mappv2"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="15" /&gt;
  &lt;uses-feature
   android:glEsVersion="0x00020000"
   android:required="true"/&gt;
  
  &lt;permission
        android:name="com.Maps.mappv2.permission.MAPS_RECEIVE"
        android:protectionLevel="signature"/&gt;
      &lt;uses-permission android:name="com.Maps.mappv2.permission.MAPS_RECEIVE"/&gt;
      &lt;uses-permission android:name="android.permission.INTERNET"/&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_COARSE_LOCATION"/&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt;
  
  
     &lt;application
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name=".MainActivity"
          android:label="@string/title_activity_main" &gt;
           &lt;intent-filter &gt;
              &lt;action android:name="android.intent.action.MAIN"/&gt;
              &lt;category android:name="android.intent.category.LAUNCHER"/&gt;
              &lt;/intent-filter&gt;
          &lt;meta-data
              android:name="android.support.PARENT_ACTIVITY"
              android:value="mm" /&gt;
      &lt;/activity&gt;
      &lt;meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="AIzaSyA64MFhpngQBkXP5__fvHeLE0xAXWKwfgU"/&gt;
    &lt;/application&gt;
  
  &lt;/manifest&gt;
  
  **Activity**
   public class MainActivity extends Activity {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
   }
  </code></pre>
  
  <p>i included google-play-services jar library file but still it showing un expectedly           stoped...</p>
  
  <pre><code> **The error are**
    12-22 20:51:59.344: E/Trace(698): error opening trace file: No such file or directory (2)
  12-22 20:52:00.165: E/AndroidRuntime(698): FATAL EXCEPTION: main
  12-22 20:52:00.165: E/AndroidRuntime(698): java.lang.NoClassDefFoundError:  com.google.android.gms.R$styleable
  12-22 20:52:00.165: E/AndroidRuntime(698):  at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.Activity.onCreateView(Activity.java:4663)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.Activity.setContentView(Activity.java:1867)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at com.Maps.mappv2.MainActivity.onCreate(MainActivity.java:13)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.Activity.performCreate(Activity.java:5008)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.os.Handler.dispatchMessage(Handler.java:99)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.os.Looper.loop(Looper.java:137)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at android.app.ActivityThread.main(ActivityThread.java:4745)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at java.lang.reflect.Method.invokeNative(Native Method)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at java.lang.reflect.Method.invoke(Method.java:511)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  12-22 20:52:00.165: E/AndroidRuntime(698):  at dalvik.system.NativeStart.main(Native Method)
  12-22 20:52:39.734: E/Trace(724): error opening trace file: No such file or directory (2)
  12-22 20:52:40.244: E/AndroidRuntime(724): FATAL EXCEPTION: main
  12-22 20:52:40.244: E/AndroidRuntime(724): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
  12-22 20:52:40.244: E/AndroidRuntime(724):  at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.Activity.onCreateView(Activity.java:4663)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.Activity.setContentView(Activity.java:1867)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at com.Maps.mappv2.MainActivity.onCreate(MainActivity.java:13)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.Activity.performCreate(Activity.java:5008)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.os.Handler.dispatchMessage(Handler.java:99)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.os.Looper.loop(Looper.java:137)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at android.app.ActivityThread.main(ActivityThread.java:4745)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at java.lang.reflect.Method.invokeNative(Native Method)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at java.lang.reflect.Method.invoke(Method.java:511)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  12-22 20:52:40.244: E/AndroidRuntime(724):  at dalvik.system.NativeStart.main(Native Method)
  12-22 20:52:49.084: E/Trace(738): error opening trace file: No such file or directory (2)
  12-22 20:52:49.624: E/AndroidRuntime(738): FATAL EXCEPTION: main
  12-22 20:52:49.624: E/AndroidRuntime(738): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
  12-22 20:52:49.624: E/AndroidRuntime(738):  at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.Activity.onCreateView(Activity.java:4663)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.Activity.setContentView(Activity.java:1867)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at com.Maps.mappv2.MainActivity.onCreate(MainActivity.java:13)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.Activity.performCreate(Activity.java:5008)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.os.Handler.dispatchMessage(Handler.java:99)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.os.Looper.loop(Looper.java:137)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at android.app.ActivityThread.main(ActivityThread.java:4745)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at  java.lang.reflect.Method.invokeNative(Native Method)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at java.lang.reflect.Method.invoke(Method.java:511)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  12-22 20:52:49.624: E/AndroidRuntime(738):  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>