<permission android:name="com.mine.signedgooglemap.permission.MAPS_RECEIVE" android:protectionLevel="signature" /> <uses-feature android:glEsVersion="0x00020000" android:required="true" /> <uses-permission android:name="com.mine.signedgooglemap.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"
/&GT;
使用此活动
package com.mine.signedgooglemap;
import android.app.Activity;
import android.os.Bundle;
import com.google.android.maps.MapActivity;
public class signedgooglemapActivity extends MapActivity {
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
protected boolean isRouteDisplayed() {
return false; //To change body of implemented methods use File | Settings | File Templates.
}
}
我的main.xml文件是
<com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" android:apiKey="AIzaSyC0WDs0wXDuGwTipv6hDnbnIOObL9oR0Ms" />
我用我的密钥库签署应用程序 然后我得到我的密钥库的sha1指纹,让谷歌控制台生成新的api密钥 通过使用这一行 5B:66:36:BB:AE:44:3B:36:52:2D:88:6F:A3:44:AD:3C:E4:0F:AB:5D; com.mine.signedgooglemap
我在调试器中收到此消息
02-05 10:56:15.228:WARN / System.err(873):IOException处理:26 02-05 10:56:15.228:WARN / System.err(873):java.io.IOException:Server 返回:3 02-05 10:56:15.234:WARN / System.err(873):at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115) 02-05 10:56:15.248:WARN / System.err(873):at android_maps_conflict_avoidance.com.google.googlenav.map.MapService $ MapTileRequest.readResponseData(MapService.java:1473) 02-05 10:56:15.254:WARN / System.err(873):at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117) 02-05 10:56:15.268:WARN / System.err(873):at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994) 02-05 10:56:15.274:WARN / System.err(873):at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher $ DispatcherServer.run(DataRequestDispatcher.java:1702) 02-05 10:56:15.274:WARN / System.err(873):at java.lang.Thread.run(Thread.java:1020)
答案 0 :(得分:0)
还要将此库包含在您的mainifest中:
<uses-library android:required="true" android:name="com.google.android.maps" />
答案 1 :(得分:0)
您是否尝试过添加
<uses-library android:name="com.google.android.maps" />
在你的清单文件中。
答案 2 :(得分:0)
要设置清单,请遵循列出的所有规范here
同样MapActivity
已折旧,如下所示。请考虑使用与Google Maps API v 2兼容的MapFragment
。