title: Google Map API code is not working. please help me
body: <pre><code>public class MainActivity extends FragmentActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  
  }
  
  }
  </code></pre>
  
  <p>Manifest file    </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.map.googlemapv2"
          android:versionCode="1"
          android:versionName="1.0" &gt;
  
          &lt;uses-sdk
              android:minSdkVersion="8"
              android:targetSdkVersion="18" /&gt;
  
          &lt;permission
              android:name="com.map.googlemapv2.permission.MAPS_RECEIVE"
              android:protectionLevel="signature" /&gt;
  
          &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
          &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&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;!--
           The following two permissions are not required to use
           Google Maps Android API v2, but are recommended.
          --&gt;
          &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
          &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
          &lt;uses-permission   android:name="com.map.googlemapv2.permission.MAPS_RECEIVE" /&gt;
  
          &lt;uses-feature
              android:glEsVersion="0x00020000"
              android:required="true" /&gt;
  
          &lt;application
              android:allowBackup="true"
              android:icon="@drawable/ic_launcher"
              android:label="@string/app_name"
              android:theme="@style/AppTheme" &gt;
              &lt;activity
                  android:name="com.map.googlemapv2.MainActivity"
                  android:label="@string/app_name" &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;/activity&gt;
  
              &lt;meta-data
                  android:name="com.google.android.maps.v2.API_KEY"
                  android:value="AIzaSyXXXXXXXXXXXXXXXXXXXXXXXX" /&gt;
          &lt;/application&gt;
  
      &lt;/manifest&gt;
  
  Layout File
  
      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          tools:context=".MainActivity" &gt;
  
          &lt;fragment
              android:id="@+id/map"
              android:name="com.google.android.gms.maps.MapFragment"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_below="@+id/btnSurrey" /&gt;
  
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>StackTrace :</p>
  
  <pre><code>        12-12 06:19:45.460: D/AndroidRuntime(907): Shutting down VM
          12-12 06:19:45.460: W/dalvikvm(907): threadid=1: thread exiting with uncaught exception (group=0xb4aeab90)
          12-12 06:19:45.500: E/AndroidRuntime(907): FATAL EXCEPTION: main
          12-12 06:19:45.500: E/AndroidRuntime(907): Process: com.amaps.androidmap, PID: 907
          12-12 06:19:45.500: E/AndroidRuntime(907): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amaps.androidmap/com.amaps.androidmap.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.ActivityThread.access$700(ActivityThread.java:135)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.os.Handler.dispatchMessage(Handler.java:102)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.os.Looper.loop(Looper.java:137)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.ActivityThread.main(ActivityThread.java:4998)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at java.lang.reflect.Method.invokeNative(Native Method)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at java.lang.reflect.Method.invoke(Method.java:515)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at dalvik.system.NativeStart.main(Native Method)
          12-12 06:19:45.500: E/AndroidRuntime(907): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.Activity.setContentView(Activity.java:1928)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at com.amaps.androidmap.MainActivity.onCreate(MainActivity.java:12)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.Activity.performCreate(Activity.java:5243)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
          12-12 06:19:45.500: E/AndroidRuntime(907):  ... 11 more
          12-12 06:19:45.500: E/AndroidRuntime(907): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.gms.maps.MapFragment: make sure class name exists, is public, and has an empty constructor that is public
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.Fragment.instantiate(Fragment.java:597)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.Fragment.instantiate(Fragment.java:561)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.Activity.onCreateView(Activity.java:4777)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
          12-12 06:19:45.500: E/AndroidRuntime(907):  ... 20 more
          12-12 06:19:45.500: E/AndroidRuntime(907): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.maps.MapFragment" on path: DexPathList[[zip file "/data/app/com.amaps.androidmap-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.amaps.androidmap-2, /system/lib]]
          12-12 06:19:45.500: E/AndroidRuntime(907):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
          12-12 06:19:45.500: E/AndroidRuntime(907):  at android.app.Fragment.instantiate(Fragment.java:583)
          12-12 06:19:45.500: E/AndroidRuntime(907):  ... 23 more
          12-12 06:23:20.842: I/Process(907): Sending signal. PID: 907 SIG: 9
          12-12 06:44:02.832: D/AndroidRuntime(1054): Shutting down VM
          12-12 06:44:02.832: W/dalvikvm(1054): threadid=1: thread exiting with uncaught exception (group=0xb4aeab90)
          12-12 06:44:02.852: E/AndroidRuntime(1054): FATAL EXCEPTION: main
          12-12 06:44:02.852: E/AndroidRuntime(1054): Process: com.amaps.androidmap, PID: 1054
          12-12 06:44:02.852: E/AndroidRuntime(1054): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amaps.androidmap/com.amaps.androidmap.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.ActivityThread.access$700(ActivityThread.java:135)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.os.Handler.dispatchMessage(Handler.java:102)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.os.Looper.loop(Looper.java:137)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.ActivityThread.main(ActivityThread.java:4998)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at java.lang.reflect.Method.invokeNative(Native Method)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at java.lang.reflect.Method.invoke(Method.java:515)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at dalvik.system.NativeStart.main(Native Method)
          12-12 06:44:02.852: E/AndroidRuntime(1054): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.Activity.setContentView(Activity.java:1928)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at com.amaps.androidmap.MainActivity.onCreate(MainActivity.java:12)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.Activity.performCreate(Activity.java:5243)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     ... 11 more
          12-12 06:44:02.852: E/AndroidRuntime(1054): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.gms.maps.SupportMapFragment: make sure class name exists, is public, and has an empty constructor that is public
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.Fragment.instantiate(Fragment.java:597)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.Fragment.instantiate(Fragment.java:561)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.Activity.onCreateView(Activity.java:4777)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     ... 21 more
          12-12 06:44:02.852: E/AndroidRuntime(1054): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.maps.SupportMapFragment" on path: DexPathList[[zip file "/data/app/com.amaps.androidmap-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.amaps.androidmap-1, /system/lib]]
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     at android.app.Fragment.instantiate(Fragment.java:583)
          12-12 06:44:02.852: E/AndroidRuntime(1054):     ... 24 more
          12-12 06:49:03.212: I/Process(1054): Sending signal. PID: 1054 SIG: 9
          12-12 06:58:53.742: D/AndroidRuntime(1100): Shutting down VM
          12-12 06:58:53.742: W/dalvikvm(1100): threadid=1: thread exiting with uncaught exception (group=0xb4aeab90)
          12-12 06:58:53.762: E/AndroidRuntime(1100): FATAL EXCEPTION: main
          12-12 06:58:53.762: E/AndroidRuntime(1100): Process: com.amaps.androidmap, PID: 1100
          12-12 06:58:53.762: E/AndroidRuntime(1100): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.amaps.androidmap/com.amaps.androidmap.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2176)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.ActivityThread.access$700(ActivityThread.java:135)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.os.Handler.dispatchMessage(Handler.java:102)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.os.Looper.loop(Looper.java:137)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.ActivityThread.main(ActivityThread.java:4998)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at java.lang.reflect.Method.invokeNative(Native Method)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at java.lang.reflect.Method.invoke(Method.java:515)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at dalvik.system.NativeStart.main(Native Method)
          12-12 06:58:53.762: E/AndroidRuntime(1100): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.Activity.setContentView(Activity.java:1928)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at com.amaps.androidmap.MainActivity.onCreate(MainActivity.java:12)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.Activity.performCreate(Activity.java:5243)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     ... 11 more
          12-12 06:58:53.762: E/AndroidRuntime(1100): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.gms.maps.SupportMapFragment: make sure class name exists, is public, and has an empty constructor that is public
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.Fragment.instantiate(Fragment.java:597)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.Fragment.instantiate(Fragment.java:561)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.Activity.onCreateView(Activity.java:4777)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     ... 21 more
          12-12 06:58:53.762: E/AndroidRuntime(1100): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.maps.SupportMapFragment" on path: DexPathList[[zip file "/data/app/com.amaps.androidmap-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.amaps.androidmap-2, /system/lib]]
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     at android.app.Fragment.instantiate(Fragment.java:583)
          12-12 06:58:53.762: E/AndroidRuntime(1100):     ... 24 more
          12-12 06:59:41.712: I/Process(1100): Sending signal. PID: 1100 SIG: 9
  </code></pre>
  
  <p>i import the library from path :
  adt-bundle-linux-x86-20131030/sdk/extras/google/google_play_services/libproject//google-play-services_lib/
   i also made the reference but still nothing happen.Dont knw what to do.</p>