我一直在搞乱一个名为“ Open GPS Tracker ”的开源应用程序,我一直无法让谷歌地图在它上面工作。我已经根据我的包名称和 SHA1 指纹获得了自己的 API 密钥,但我无法让地图显示除网格之外的任何内容。清单权限和 map.xml 文件如下。任何建议将不胜感激。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="nl.sogeti.android.gpstracker"
android:installLocation="auto"
android:versionCode="85"
android:versionName="0.5" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="16" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="true" />
<application
android:allowClearUserData="true"
android:description="@string/app_name"
android:hardwareAccelerated="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="com.google.android.maps" />
} MAPS.XML
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/mapScreen"
>
<com.google.android.maps.MapView
android:id="@+id/myMapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="my key is here"
android:visibility="visible" />
<!-- Release : 0bmdf4-ggC50QWBY1OgGRutQ9bIboIy11OczZbw -->
<!-- Emulator : 0bmdf4-ggC50QJGdjml6Turq0NJdMhKFQNdhkYA -->
<org.osmdroid.views.MapView
android:id="@+id/myOsmMapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
renderer="CLOUDMADESTANDARDTILES"
cloudmadeStyle="1"
android:visibility="gone"
/>