android - 谷歌地图 (com.google.android.maps) 使应用程序崩溃

标签 android google-maps crash

我一直在尝试在 android 中使用谷歌地图。
但是应用程序崩溃了。 :(

这是我的xml代码:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
   <com.google.android.maps.MapView 
    android:id="@+id/mapView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:apiKey="0E8T-qQndWDg8lEScymvQro3kJ1bGlSKLolDE3Q"
    />            
 </LinearLayout>

我已经包括(之后):
<uses-permission android:name="android.permission.INTERNET" />

还有(之后):
 <uses-library android:name="com.google.android.maps" />

我找不到任何错误。

最佳答案

只需要扩展 MapActivity 而不是 Activity。

关于android - 谷歌地图 (com.google.android.maps) 使应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6300578/

相关文章:

android - 从USB拔出时,Android App崩溃

iphone - CFDataGetBytePtr期间应用崩溃

java - 如何使用 libgdx assetmanager 正确加载纹理

javascript - Google Maps API 设置图标大小

javascript - Google map API 中心标记 + 地理定位

javascript - 标记未显示在谷歌地图上,但控制台中没有错误

ios - iOS 应用程序 Google 跟踪代码管理器实现随机崩溃

java - 使用 ksoap2-android 时出现异常

android - Logo 无响应

java - 传递在 Activity 之间单击的 ListView 项目