title: Can't get it working Google api 2 Android
body: <p>Even when i import: </p>
  
  <pre><code> import android.support.v4.app.FragmentActivity;  
   import com.google.android.gms.maps.SupportMapFragment;
  </code></pre>
  
  <p>I am still getting this error messaging:</p>
  
  <pre><code> FATAL EXCEPTION: main
   java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.googlev2map/com.example.googlev2map.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4627)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  at dalvik.system.NativeStart.main(Native Method)
  Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:582)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
  at android.app.Activity.setContentView(Activity.java:1647)
  at com.example.googlev2map.MainActivity.onCreate(MainActivity.java:13)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
  Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the &lt;application&gt; element:     &lt;meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /&gt;
  at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
  at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
  at com.google.android.gms.maps.internal.q.v(Unknown Source)
  at com.google.android.gms.maps.internal.q.u(Unknown Source)
  at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
  at com.google.android.gms.maps.SupportMapFragment$b.cE(Unknown Source)
  at com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
  at com.google.android.gms.dynamic.a.a(Unknown Source)
  at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
  at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
  at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:279)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:558)
  </code></pre>
  
  <p>Doesn't work in my AVD, or directly on my Phone.
  I import the google-play-services_lib and put the reference in this map project.
  With min sdk 8...</p>
  
  <p>Here is my coding,</p>
  
  <p>My Layout File:</p>
  
  <pre><code>&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"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" &gt;
  
  &lt;fragment
   class="com.google.android.gms.maps.SupportMapFragment"
   android:id="@+id/map"  
   android:layout_width="match_parent"
   android:layout_height="match_parent"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>MainActivity:</p>
  
  <pre><code>package com.example.googlev2map;
  
  import android.support.v4.app.FragmentActivity;  
  import com.google.android.gms.maps.SupportMapFragment;
  
  import android.os.Bundle;
  
  public class MainActivity extends FragmentActivity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      }
  }
  </code></pre>
  
  <p>And my Manifest.xml :</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.example.googlev2map"
          android:versionCode="1"
          android:versionName="1.0" &gt;
  
          &lt;uses-sdk
              android:minSdkVersion="8"
              android:targetSdkVersion="17" /&gt;
  
              &lt;permission
              android:name="com.example.googlev2map.permission.MAPS_RECEIVE"
              android:protectionLevel="signature"/&gt;
      &lt;uses-permission android:name="com.example.googlev2map.permission.MAPS_RECEIVE"/&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-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.example.googlev2map.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="AIzaSyBCn4SFyAoO9Enk39Zaq9-Gq25BGu7IsiU"/&gt;
          &lt;/application&gt;
  
      &lt;/manifest&gt;
  </code></pre>