当我移植使用谷歌地图的应用程序时,所有显示的都是网格,而不是位置图。我该如何解决? 我们已经在线在Google API控制台中注册了该项目,并从eclipse获得了一个密钥并检查了它们是否匹配。 (我们打开了“Google Maps Android API v2”和“Google Maps API v3”) 我们还根据官方的android教程检查了所有权限。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.soconnection"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="com.google.android.maps" />
<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.crap"
android:value="crap" />
<activity
android:name="com.example.soconnection.FullscreenActivity"
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.soconnection.WebActivity"
android:label="@string/title_activity_web" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name="com.example.soconnection.Webactivity"
android:label="@string/title_activity_webactivity" >
</activity>
</application>
</manifest>
Logcat:
01-30 16:41:40.166: W/MapActivity(11548): Recycling dispatcher android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher@41731250
01-30 16:41:40.166: V/MapActivity(11548): Recycling map object.
01-30 16:41:40.256: I/MapActivity(11548): Handling network change notification:CONNECTED
01-30 16:41:40.256: E/MapActivity(11548): Couldn't get connection factory client
01-30 16:41:40.716: W/System.err(11548): IOException processing: 26
01-30 16:41:40.716: W/System.err(11548): java.io.IOException: Server returned: 3
01-30 16:41:40.716: W/System.err(11548): at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
01-30 16:41:40.716: W/System.err(11548): at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
01-30 16:41:40.716: W/System.err(11548): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
01-30 16:41:40.716: W/System.err(11548): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
01-30 16:41:40.716: W/System.err(11548): at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
01-30 16:41:40.716: W/System.err(11548): at java.lang.Thread.run(Thread.java:856)
然后行“java.io.IOException:Server Returned:3”到最后只是重复了很多次。