title: android google map API problems
body: <p>Right, I understand this question has been answered on many places, And yet I don't get what problem I have, I have recently moved to android application and trying to use map on my app.</p>
  
  <p>I exactly followed these links:</p>
  
  <p><a href="https://www.youtube.com/watch?v=wNlleczyPjs" rel="nofollow">https://www.youtube.com/watch?v=wNlleczyPjs</a></p>
  
  <p><a href="https://developers.google.com/maps/documentation/android/start#install_and_configure_the_google_play_services_sdk" rel="nofollow">https://developers.google.com/maps/documentation/android/start#install_and_configure_the_google_play_services_sdk</a></p>
  
  <p>So my question is, what else could I have done wrong. I just don't get it...</p>
  
  <p>My feeling is that my key is not registered properly but when I created new key I provided following information:</p>
  
  <pre><code>Android apps:   
  9D:7C:&lt;THIS BIT IS SECRET&gt;84:0F;com.example.myapp
  </code></pre>
  
  <p><strong>EXTRA INFORMATION</strong></p>
  
  <p>here is the error log:</p>
  
  <pre><code>11-28 11:09:59.471: E/AndroidRuntime(31683): FATAL EXCEPTION: main
  11-28 11:09:59.471: E/AndroidRuntime(31683): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.ActivityThread.access$600(ActivityThread.java:140)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.os.Handler.dispatchMessage(Handler.java:99)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.os.Looper.loop(Looper.java:137)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.ActivityThread.main(ActivityThread.java:4898)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at java.lang.reflect.Method.invokeNative(Native Method)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at java.lang.reflect.Method.invoke(Method.java:511)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at dalvik.system.NativeStart.main(Native Method)
  11-28 11:09:59.471: E/AndroidRuntime(31683): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:308)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.Activity.setContentView(Activity.java:1924)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at com.example.myapp.MainActivity.onCreate(MainActivity.java:8)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.Activity.performCreate(Activity.java:5206)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1083)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    ... 11 more
  11-28 11:09:59.471: E/AndroidRuntime(31683): 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
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.Fragment.instantiate(Fragment.java:584)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.Fragment.instantiate(Fragment.java:552)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.Activity.onCreateView(Activity.java:4849)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    ... 20 more
  11-28 11:09:59.471: E/AndroidRuntime(31683): Caused by: java.lang.ClassNotFoundException: com.google.android.gms.maps.SupportMapFragment
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    at android.app.Fragment.instantiate(Fragment.java:574)
  11-28 11:09:59.471: E/AndroidRuntime(31683):    ... 23 more
  11-28 11:09:59.511: D/dalvikvm(31683): GC_CONCURRENT freed 190K, 9% free 12391K/13575K, paused 12ms+2ms, total 36ms
  </code></pre>
  
  <p>here is the code :</p>
  
  <pre><code>package com.example.myapp;
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  public class MainActivity extends FragmentActivity{
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  }
  </code></pre>
  
  <p>Here is the androidManifext.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.myapp"
      android:versionCode="1"
      android:versionName="1.0" &gt;
      &lt;uses-sdk  android:minSdkVersion="8"   android:targetSdkVersion="21" /&gt; 
    &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&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="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" &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.maps.v2.API_KEY"
              android:value="AIzXXXXXXXXXXXXXXXXXXXXXwKo"/&gt;
                  &lt;meta-data android:name="com.google.android.gms.version"
              android:value="@integer/google_play_services_version" /&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>and here is main_activity.xml layout:</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"
    class="com.google.android.gms.maps.SupportMapFragment"/&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>
  
  <p><strong>IT WORKED</strong>
  Jesus , it just started working out of no where. eclipse just got stock it took me about 10min to get eclipse working. now it just started to work and so is the app. I have no idea what happened and no idea why it was bugging me. basically all I can say is probably it takes few hours for an api key to get to work.</p>