Android Google maps v2膨胀片段时出错

Android Google maps v2膨胀片段时出错,android,api,google-maps,android-fragments,Android,Api,Google Maps,Android Fragments,一天半的时间里,我对谷歌地图的实现完全感到困惑。我遵循了链接中提到的所有必要步骤。 但每次我都会听到下面提到的错误。我需要你的鹰眼经验 错误: 04-22 12:02:14.599: E/AndroidRuntime(6702): FATAL EXCEPTION: main 04-22 12:02:14.599: E/AndroidRuntime(6702): java.lang.RuntimeException: Unable to start activity Component

一天半的时间里,我对谷歌地图的实现完全感到困惑。我遵循了链接中提到的所有必要步骤。

但每次我都会听到下面提到的错误。我需要你的鹰眼经验

错误:

04-22 12:02:14.599: E/AndroidRuntime(6702): FATAL EXCEPTION: main
04-22 12:02:14.599: E/AndroidRuntime(6702): java.lang.RuntimeException: Unable to start activity     
ComponentInfo{com.example.srihari/com.example.srihari.MapLocation}: 
android.view.InflateException: Binary XML file line #7: Error inflating class fragment
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.ActivityThread.access$700(ActivityThread.java:140)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at android.os.Looper.loop(Looper.java:137)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.ActivityThread.main(ActivityThread.java:4921)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
java.lang.reflect.Method.invokeNative(Native Method)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
java.lang.reflect.Method.invoke(Method.java:511)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at dalvik.system.NativeStart.main(Native 
Method)
04-22 12:02:14.599: E/AndroidRuntime(6702): Caused by: android.view.InflateException: Binary XML 
file line #7: Error inflating class fragment
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.view.LayoutInflater.inflate(LayoutInflater.java:489)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.view.LayoutInflater.inflate(LayoutInflater.java:396)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.view.LayoutInflater.inflate(LayoutInflater.java:352)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:316)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.Activity.setContentView(Activity.java:1924)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.example.srihari.MapLocation.onCreate(MapLocation.java:36)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.Activity.performCreate(Activity.java:5188)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
04-22 12:02:14.599: E/AndroidRuntime(6702):     ... 11 more
04-22 12:02:14.599: E/AndroidRuntime(6702): Caused by: java.lang.IllegalStateException: The meta-
data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4323000 but 
found 0.  You must have the following declaration within the <application> element:     <meta-
data android:name="com.google.android.gms.version" 
android:value="@integer/google_play_services_version" />
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.common.GooglePlayServicesUtil.t(Unknown Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown 
Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.maps.internal.q.B(Unknown Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.maps.internal.q.A(Unknown Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.maps.SupportMapFragment$b.gW(Unknown Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at com.google.android.gms.dynamic.a.a(Unknown 
Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.dynamic.a.onInflate(Unknown Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:290)
04-22 12:02:14.599: E/AndroidRuntime(6702):     at 
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
04-22 12:02:14.599: E/AndroidRuntime(6702):     ... 21 more
04-22 12:02:14.599:E/AndroidRuntime(6702):致命异常:main
04-22 12:02:14.599:E/AndroidRuntime(6702):java.lang.RuntimeException:无法启动活动
ComponentInfo{com.example.srihari/com.example.srihari.MapLocation}:
android.view.InflateException:二进制XML文件行#7:膨胀类片段时出错
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
access$700(ActivityThread.java:140)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.os.Handler.dispatchMessage(Handler.java:99)
04-22 12:02:14.599:E/AndroidRuntime(6702):在android.os.Looper.loop(Looper.java:137)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
main(ActivityThread.java:4921)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
java.lang.reflect.Method.Invokenactive(本机方法)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
java.lang.reflect.Method.invoke(Method.java:511)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
04-22 12:02:14.599:E/AndroidRuntime(6702):在dalvik.system.NativeStart.main(本机)
(方法)
04-22 12:02:14.599:E/AndroidRuntime(6702):由以下原因引起:android.view.InflateException:二进制XML
文件行#7:膨胀类片段时出错
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
rInflate(LayoutInflater.java:746)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
膨胀(LayoutInflater.java:489)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
膨胀(LayoutInflater.java:396)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
膨胀(LayoutInflater.java:352)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:316)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.app.Activity.setContentView(Activity.java:1924)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.example.srihari.MapLocation.onCreate(MapLocation.java:36)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.app.Activity.performCreate(Activity.java:5188)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
04-22 12:02:14.599:E/AndroidRuntime(6702):。。。还有11个
04-22 12:02:14.599:E/AndroidRuntime(6702):由以下原因引起:java.lang.IllegalStateException:元-
应用程序的AndroidManifest.xml中的数据标记没有正确的值。预计4323000,但
找到0。元素中必须有以下声明:
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.common.GooglePlayServicesUtil.t(未知来源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(未知)
(来源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.maps.internal.q.B(未知来源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.maps.internal.q.A(未知来源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.maps.MapsInitializer.initialize(未知源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.maps.SupportMapFragment$b.gW(未知来源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.maps.SupportMapFragment$b.a(未知来源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在com.google.android.gms.dynamic.a.a(未知)
(来源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.dynamic.a.onInflate(未知来源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
com.google.android.gms.maps.SupportMapFragment.onInflate(未知源)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:290)
04-22 12:02:14.599:E/AndroidRuntime(6702):在
createViewFromTag(LayoutInflater.java:676)
04-22 12:02:14.599:E/AndroidRuntime(6702):。。。还有21个
XML:


代码:

package com.example.srihari;
导入com.google.android.gms.common.ConnectionResult;
导入com.google.android.gms.common.GooglePlayServicesUtil;
导入com.google.android.gms.maps.CameraUpdateFactory;
导入com.google.android.gms.maps.GoogleMap;
导入com.google.android.gms.maps.GoogleMap.OnMapClickListener;
导入com.google.android.gms.maps.GoogleMap.OnMapLongClickListener;
导入com.google.android.gms.maps.SupportMapFragment;
导入com.google.android.gms.maps.model.LatLng;
导入com.google.android.gms.maps.model.MarkerOptions;
导入android.app.Dialog;
导入android.content.SharedReferences;
导入android.os.Bundle;
导入android.support.v4.app.FragmentActivity;
导入android.v
<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" >

<fragment 
    android:id="@+id/map2"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.google.android.gms.maps.SupportMapFragment" />

    </RelativeLayout>
package com.example.srihari;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMap.OnMapClickListener;
import com.google.android.gms.maps.GoogleMap.OnMapLongClickListener;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;


import android.app.Dialog;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.widget.Toast;





public class MapLocation extends FragmentActivity {


GoogleMap googleMap;    
SharedPreferences sharedPreferences;    
int locationCount = 0;


@Override

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.map_locations);

    // Getting Google Play availability status
    int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());

    // Showing status
    if(status!=ConnectionResult.SUCCESS){ // Google Play Services are not available

        int requestCode = 10;
        Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, this, requestCode);
        dialog.show();

    }else { // Google Play Services are available           

        // Getting reference to the SupportMapFragment of activity_main.xml
        SupportMapFragment fm = (SupportMapFragment) 
getSupportFragmentManager().findFragmentById(R.id.map2);

        // Getting GoogleMap object from the fragment
        googleMap = fm.getMap();

        // Enabling MyLocation Layer of Google Map
        googleMap.setMyLocationEnabled(true);           

        // Opening the sharedPreferences object
        sharedPreferences = getSharedPreferences("location", 0);

        // Getting number of locations already stored
        locationCount = sharedPreferences.getInt("locationCount", 0);


        // Getting stored zoom level if exists else return 0
        String zoom = sharedPreferences.getString("zoom", "0");

        // If locations are already saved
        if(locationCount!=0){           

            String lat = "";
            String lng = "";

            // Iterating through all the locations stored
            for(int i=0;i<locationCount;i++){

                // Getting the latitude of the i-th location
                lat = sharedPreferences.getString("lat"+i,"0");

                // Getting the longitude of the i-th location
                lng = sharedPreferences.getString("lng"+i,"0");

                // Drawing marker on the map
                drawMarker(new LatLng(Double.parseDouble(lat), 
Double.parseDouble(lng)));                  
            }

            // Moving CameraPosition to last clicked position
            googleMap.moveCamera(CameraUpdateFactory.newLatLng(new 
LatLng(Double.parseDouble(lat), Double.parseDouble(lng))));

            // Setting the zoom level in the map on last position  is clicked
            googleMap.animateCamera(CameraUpdateFactory.zoomTo(Float.parseFloat(zoom)));                            
        }

    }        

    googleMap.setOnMapClickListener(new OnMapClickListener() {

        @Override
        public void onMapClick(LatLng point) {      
            locationCount++;

            // Drawing marker on the map
            drawMarker(point);

            /** Opening the editor object to write data to sharedPreferences */
            SharedPreferences.Editor editor = sharedPreferences.edit();         

            // Storing the latitude for the i-th location
            editor.putString("lat"+ Integer.toString((locationCount-1)), 
Double.toString(point.latitude));

            // Storing the longitude for the i-th location
            editor.putString("lng"+ Integer.toString((locationCount-1)), 
Double.toString(point.longitude));

            // Storing the count of locations or marker count
            editor.putInt("locationCount", locationCount);              

            /** Storing the zoom level to the shared preferences */
            editor.putString("zoom", Float.toString(googleMap.getCameraPosition().zoom));               

            /** Saving the values stored in the shared preferences */
            editor.commit();            

            Toast.makeText(getBaseContext(), "Marker is added to the Map", 
Toast.LENGTH_SHORT).show();                 

        }
    }); 


    googleMap.setOnMapLongClickListener(new OnMapLongClickListener() {              
        @Override
        public void onMapLongClick(LatLng point) {

            // Removing the marker and circle from the Google Map
            googleMap.clear();

            // Opening the editor object to delete data from sharedPreferences
            SharedPreferences.Editor editor = sharedPreferences.edit();

            // Clearing the editor
            editor.clear();

            // Committing the changes
            editor.commit();

            // Setting locationCount to zero
            locationCount=0;

        }
    });           


}

private void drawMarker(LatLng point){
    // Creating an instance of MarkerOptions
    MarkerOptions markerOptions = new MarkerOptions();                  

    // Setting latitude and longitude for the marker
    markerOptions.position(point);

    // Adding marker on the Google Map
    googleMap.addMarker(markerOptions);         
}



@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
}


}
<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.srihari"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="14" />

 <permission
      android:name="com.example.srihari.permission.MAPS_RECEIVE"
      android:protectionLevel="signature"/>


<uses-permission android:name="com.example.srihari.permission.MAPS_RECEIVE"/>

<uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

     <uses-feature
    android:glEsVersion="0x00020000"
    android:required="true"/>   

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >



   <meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyB4yLFPrGuyVMJOUMweUJI7iliPYu88FS0"/>


    <activity
        android:name="com.example.srihari.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>


       <activity
        android:name="com.example.srihari.LogIn"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

        <activity
        android:name="com.example.srihari.ImportFile"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

        <activity
        android:name="com.example.srihari.SelectCustomer"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
      <activity
        android:name="com.example.srihari.ProductList"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

       <activity
        android:name="com.example.srihari.ImportImageDetails"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

        <activity
        android:name="com.example.srihari.CreateConfirmOrderList"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.example.srihari.ShowImage"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.example.srihari.DataXmlExporter"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

    <activity
        android:name="com.example.srihari.OrderUpdate"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

    <activity
        android:name="com.example.srihari.StatusImport"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

     <activity
        android:name="com.example.srihari.OrderHistory"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

        <activity
        android:name="com.example.srihari.SingleOrderDetails"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

         <activity
          android:name="com.example.srihari.CustomerDetailsSingle"
          android:label="@string/app_name" >
            <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
       </activity>

          <activity
        android:name="com.example.srihari.MainActivityIndivisual"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>


            <activity
        android:name="com.example.srihari.MapLocation"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>


            <activity
        android:name="com.example.srihari.ThankYouPage"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>



</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SEND_SMS" />
 <uses-permission android:name="android.permission.RECEIVE_SMS" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>


</manifest>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
....<application>
..............
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="Key" />

<meta-data android:name="com.google.android.gms.version"  
android:value="@integer/google_play_services_version" />

</application>
<meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
<meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="**Replace with your key**" />
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="19" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <uses-library android:name="com.google.android.maps" />
    <activity
        android:name="com.example.package.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="**Replace with your key**" />
</application>