我有一个使用谷歌地图和谷歌播放的 Android 应用程序,当用户下载应用程序并调出地图时,非洲的默认视图保持不变,不会转到用户位置。当我构建应用程序时,我从我的发布密钥库中提取了 SHA-1 并将其添加到 Google API 控制台,它为我提供了我的发布密钥,我将它添加到我的 AndroidManifest.xml 中。当我从调试模式或 Google Play 运行应用程序时,地图会显示我当前的位置以及用户需要去的路线。有什么建议么?
我的 AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eema"
android:versionCode="5"
android:versionName="5" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="10" />
<permission
android:name="com.eema.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.eema" />
<uses-permission android:name="com.eema.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<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" />
<!--
The following two permissions are not required to use
Google Maps Android API v2, but are recommended.
-->
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET"/>
<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"/>
<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="xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" /> -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="OOOOOOOOOOOOOOOOOOOOOOOOO" />
<activity
android:name="com.eema.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>
<activity
android:name="com.eema.MapViewActivity"
android:label="@string/title_activity_map_view" >
</activity>
<activity
android:name="com.eema.NoConnectionActivity"
android:label="@string/title_activity_no_connection" >
</activity>
<activity
android:name="com.eema.ShelterActivity"
android:label="@string/title_activity_shelter" >
</activity>
<activity
android:name="com.eema.FuelStopActivity"
android:label="@string/title_activity_fuel_stop" >
</activity>
<activity
android:name="com.eema.DirectionsActivity"
android:label="@string/title_activity_directions" >
</activity>
<activity
android:name="com.eema.EvacRouteTableActivity"
android:label="@string/title_activity_evac_route_table" >
</activity>
</application>