当我运行我的应用程序有来自Eclispe的一个谷歌地图,地图上显示出来,所有的地图功能的工作..与谷歌地图API密钥奇怪的错误
但是,如果我与朋友分享我的Eclipse项目或者将我的应用导出为APK并将其重新安装到设备上,地图不会显示出来。它说:
02-07 00:26:39.644: E/Google Maps Android API(3605): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
我不知道是什么造成这种情况。特别是因为当我(从控制台获取APK并将所有内容设置为SHA1)从Eclipse运行时,它能正常工作吗?
这是我与地图碎片
<android.support.v4.widget.DrawerLayout ...... >
<LinearLayout ... >
<RelativeLayout ..>
<Button ... > </Button>
<EditText .. > </EditText>
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="20"
class="com.google.android.gms.maps.SupportMapFragment" />
</LinearLayout>
<ListView android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="#111"/>
</android.support.v4.widget.DrawerLayout>
你使用清单发布API密钥。 – Yugesh
嗨读完你的问题后,我想为生成地图键,你用你的android-debug-key,是吗? –
生成另一个API密钥并尝试。 –