title: Unable to setup Google Play Services
body: <p>I have been stuck over a day to use the Google Play Service. This is a very bad procedure created by Google. Why it is that difficult??
  I want to use Google Play Service in order to develop some apps which depends on the Map. I have been tried everything step by step, discussed on many sites but still unable to get it. I thought only the StackOverflow can help in this situation. I can't give the link of all the reference websites but i am giving some of them-<br/>
  <a href="http://developer.android.com/google/play-services/setup.html#Setup" rel="nofollow noreferrer">http://developer.android.com/google/play-services/setup.html#Setup</a> <br/>
  <a href="http://www.vogella.com/tutorials/AndroidGoogleMaps/article.html#installmaps" rel="nofollow noreferrer">http://www.vogella.com/tutorials/AndroidGoogleMaps/article.html#installmaps</a>
  <br/>
  <a href="https://stackoverflow.com/questions/16854760/setup-google-play-games-services">Setup Google Play Games Services</a>
  <br/>
  I am using Eclipse ADT Bundle. Google Play Service has a mark with a tick in Android SDK which indicates that it is installed. It is also foud in the proper directory. I am providing the snapshot of my project-
  <img src="https://i.stack.imgur.com/B8K2R.png" alt="enter image description here"></p>
  
  <p><br/>The above snoapshot shows the activity_main.xml, Errors while Launching the application and Project Tree Structure. It also shows that google_play_service_lib has been imported.</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity {
  
  static final LatLng HAMBURG = new LatLng(53.558, 9.927);
    static final LatLng KIEL = new LatLng(53.551, 9.993);
    private GoogleMap map;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
       map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
              .getMap();
          Marker hamburg = map.addMarker(new MarkerOptions().position(HAMBURG)
              .title("Hamburg"));
          Marker kiel = map.addMarker(new MarkerOptions()
              .position(KIEL)
              .title("Kiel")
              .snippet("Kiel is cool")
              .icon(BitmapDescriptorFactory
                  .fromResource(R.drawable.ic_launcher)));
  
          // Move the camera instantly to hamburg with a zoom of 15.
          map.moveCamera(CameraUpdateFactory.newLatLngZoom(HAMBURG, 15));
  
          // Zoom in, animating the camera.
          map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
  }
  </code></pre>
  
  <p>The Project is not contain any error. I've also added the code into the proguard-project.txt and the android-manifest.xml is</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.latlongfrommap"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  &lt;uses-sdk
      android:minSdkVersion="17"
      android:targetSdkVersion="19" /&gt;
  
  &lt;uses-permission android:name="com.vogella.android.locationapi.maps.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="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&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.latlongfrommap.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="AIzaSyAQXXXXXXXXXXXXXXpADfMsO4fF0eEXdRE" /&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>
  Also I've been generated the API Key from the console.Graphical layout of activity-main is also has an warning.<img src="https://i.stack.imgur.com/43kcR.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/APwZr.png" alt="enter image description here"></p>
  
  <p><strong>Please Help me out</strong> by your valuable advise. Thanking you.<br/>
  <strong>EDIT:</strong><br/>
  In the official set up guide, they didn't mention that jar file should be added to the library.. I did that because I found it in many websites.. is It correct??.. The fragment tag is not detected by the activity_main.xml.. is there any problem with that??
  <br/>
  Yes, I was right about the jar file. It should not be added. It was creating some kind of conflict. But I still have errors</p>
  
  <pre><code>FATAL EXCEPTION: main
  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.latlongfrommap/com.example.latlongfrommap.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2314)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
  at android.app.ActivityThread.access$800(ActivityThread.java:148)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:135)
  at android.app.ActivityThread.main(ActivityThread.java:5312)
  at java.lang.reflect.Method.invoke(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
  Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:763)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
  at android.app.Activity.setContentView(Activity.java:2154)
  at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
  at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
  at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
  at com.example.latlongfrommap.MainActivity.onCreate(MainActivity.java:25)
  at android.app.Activity.performCreate(Activity.java:5953)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1128)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2267)
  ... 10 more
  Caused by: java.lang.SecurityException: The Maps API requires the additional following permissions to be set in the AndroidManifest.xml to ensure a correct behavior:
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  at com.google.maps.api.android.lib6.c.ck.a(Unknown Source)
  at com.google.maps.api.android.lib6.c.i.a(Unknown Source)
  at com.google.maps.api.android.lib6.c.el.a(Unknown Source)
  at com.google.maps.api.android.lib6.c.ab.a(Unknown Source)
  at com.google.maps.api.android.lib6.c.aa.a(Unknown Source)
  at com.google.android.gms.maps.internal.x.onTransact(SourceFile:107)
  at android.os.Binder.transact(Binder.java:380)
  at com.google.android.gms.maps.internal.IMapFragmentDelegate$a$a.onCreateView(Unknown Source)
  at com.google.android.gms.maps.MapFragment$a.onCreateView(Unknown Source)
  at com.google.android.gms.dynamic.a$4.b(Unknown Source)
  at com.google.android.gms.dynamic.a.a(Unknown Source)
  at com.google.android.gms.dynamic.a.onCreateView(Unknown Source)
  at com.google.android.gms.maps.MapFragment.onCreateView(Unknown Source)
  at android.app.Fragment.performCreateView(Fragment.java:2053)
  at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:870)
  at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1045)
  at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1147)
  at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2118)
  at android.app.Activity.onCreateView(Activity.java:5302)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:733)
  ... 23 more
  </code></pre>