title: Android Google MAP API does not work
body: <p>I'm trying to show a map in the application, but I'm failing to do so.</p>
  
  <p>My emulator runs the Google API 19 and I checked the google play services as referenced library.</p>
  
  <p>On API Console I switched the Google map API on, but it's still not working. Any help is appreciated!</p>
  
  <p><strong>MainActivity.java:</strong></p>
  
  <pre><code>   public class MainActivity extends Activity {
     @Override
      protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_main);
      }
     }
  </code></pre>
  
  <p><strong>Manifest file</strong></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.haber"
      android:versionCode="1"
      android:versionName="1.0" &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;!-- 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;uses-sdk
          android:minSdkVersion="8"
          android:targetSdkVersion="21" /&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=".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.gms.version"
      android:value="@integer/google_play_services_version" /&gt;
          &lt;meta-data
      android:name="com.google.android.maps.v2.AIzaSyB0-fA5Q1of75JqI-----------"
      android:value="AIzaSyB0-fA5Q1of75JqIeb0cRAaI---------"/&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>&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"
            android:name="com.google.android.gms.maps.SupportMapFragment"/&gt;
  </code></pre>
  
  <p><strong>LogCat</strong></p>
  
  <pre><code>07-16 09:11:10.206: D/dalvikvm(1461): GC_FOR_ALLOC freed 127K, 11% free 3546K/3960K, paused 209ms, total 220ms
  07-16 09:11:10.366: I/u(1461): Making Creator dynamically
  07-16 09:11:10.486: I/Google Maps Android API(1461): Google Play services client version: 5077000
  07-16 09:11:10.496: I/dalvikvm(1461): Could not find method guj.a, referenced from method gqi.a
  07-16 09:11:10.496: W/dalvikvm(1461): VFY: unable to resolve static method 24932: Lguj;.a (Landroid/content/Context;)Lgri;
  07-16 09:11:10.496: D/dalvikvm(1461): VFY: replacing opcode 0x71 at 0x0003
  07-16 09:11:10.506: E/dalvikvm(1461): Could not find class 'gpr', referenced from method gps.a
  07-16 09:11:10.506: W/dalvikvm(1461): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
  07-16 09:11:10.516: D/dalvikvm(1461): VFY: replacing opcode 0x22 at 0x0000
  07-16 09:11:10.516: E/dalvikvm(1461): Could not find class 'gpr', referenced from method gps.a
  07-16 09:11:10.516: W/dalvikvm(1461): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
  07-16 09:11:10.516: D/dalvikvm(1461): VFY: replacing opcode 0x22 at 0x0000
  07-16 09:11:10.526: E/dalvikvm(1461): Could not find class 'gpr', referenced from method gps.a
  07-16 09:11:10.526: W/dalvikvm(1461): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
  07-16 09:11:10.526: D/dalvikvm(1461): VFY: replacing opcode 0x22 at 0x0000
  07-16 09:11:10.526: D/dalvikvm(1461): DexOpt: unable to opt direct call 0x5e9f at 0x0a in Lgps;.a
  07-16 09:11:10.526: D/dalvikvm(1461): DexOpt: unable to opt direct call 0x5e9f at 0x0c in Lgps;.a
  07-16 09:11:10.536: D/dalvikvm(1461): DexOpt: unable to opt direct call 0x5e9f at 0x0a in Lgps;.a
  07-16 09:11:10.546: I/Google Maps Android API(1461): Google Play services package version: 5077030
  07-16 09:11:10.556: W/dalvikvm(1461): VFY: unable to resolve static field 20868 (t) in Lyp;
  07-16 09:11:10.556: D/dalvikvm(1461): VFY: replacing opcode 0x62 at 0x000e
  07-16 09:11:10.566: W/dalvikvm(1461): VFY: unable to resolve static field 20868 (t) in Lyp;
  07-16 09:11:10.566: D/dalvikvm(1461): VFY: replacing opcode 0x62 at 0x000d
  07-16 09:11:10.696: D/AndroidRuntime(1461): Shutting down VM
  07-16 09:11:10.696: W/dalvikvm(1461): threadid=1: thread exiting with uncaught exception (group=0xb1af5ba8)
  07-16 09:11:10.736: E/AndroidRuntime(1461): FATAL EXCEPTION: main
  07-16 09:11:10.736: E/AndroidRuntime(1461): Process: com.example.haber, PID: 1461
  07-16 09:11:10.736: E/AndroidRuntime(1461): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.haber/com.example.haber.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.ActivityThread.access$800(ActivityThread.java:135)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.os.Handler.dispatchMessage(Handler.java:102)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.os.Looper.loop(Looper.java:136)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.ActivityThread.main(ActivityThread.java:5017)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at java.lang.reflect.Method.invokeNative(Native Method)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at java.lang.reflect.Method.invoke(Method.java:515)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at dalvik.system.NativeStart.main(Native Method)
  07-16 09:11:10.736: E/AndroidRuntime(1461): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.Activity.setContentView(Activity.java:1929)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.example.haber.MainActivity.onCreate(MainActivity.java:14)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.Activity.performCreate(Activity.java:5231)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     ... 11 more
  07-16 09:11:10.736: E/AndroidRuntime(1461): Caused by: java.lang.RuntimeException: API key not found.  Check that &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="your API key"/&gt; is in the &lt;application&gt; element of AndroidManifest.xml
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at ozd.a(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at ozd.a(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at ozd.a(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at ozd.a(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at oyf.a(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at ouk.a(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at ouj.a(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at grv.onTransact(SourceFile:107)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.os.Binder.transact(Binder.java:361)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.google.android.gms.maps.internal.IMapFragmentDelegate$a$a.onCreateView(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.google.android.gms.maps.SupportMapFragment$a.onCreateView(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.google.android.gms.dynamic.a$4.b(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.google.android.gms.dynamic.a.a(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.google.android.gms.dynamic.a.onCreateView(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.support.v4.app.Fragment.performCreateView(Fragment.java:1504)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:915)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1099)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1201)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:292)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
  07-16 09:11:10.736: E/AndroidRuntime(1461):     ... 20 more
  </code></pre>