【发布时间】:2012-03-23 06:46:15
【问题描述】:
这是 XML 文件:
<com.google.android.maps.MapView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="0q7NUYm4bgzeXlqXtKYVPJDRWUJmt8Cu0gvbWMx"
android:id="@+id/map_view"
/>
和清单文件:
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="com.google.android.maps" />
<activity
android:label="@string/app_name"
android:name=".MapsActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
在 JAVA 文件中:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mapView = (MapView) findViewById(R.id.map_view);
mapView.setBuiltInZoomControls(true);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
我的问题是:地图没有显示。 我遇到了一个问题 Android 模拟器。
【问题讨论】:
-
已生成您自己的 Map 密钥?
-
您是否遇到任何异常,请发布。并确保您为 Map API 获得的密钥是最新的。还有一件事 MapKey 对于不同的机器是不同的......
-
上述替代方案的简单步骤......technotalkative.com/…
-
感谢您的回复错误:未能找到 com.google.settings 的提供者信息无法获取连接工厂客户端
标签: android android-maps