【问题标题】:Google map app NOT working in android谷歌地图应用无法在安卓系统中运行
【发布时间】:2013-08-02 20:30:48
【问题描述】:

我是一名新的安卓开发者。 我制作了安卓谷歌地图应用程序, 但它只显示空图块(不显示地图)

我已经生成了 5 次 API 密钥并使用了它...但是没有人在工作

清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.akki"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />

    <uses-permission android:name="android.permission.SET_DEBUG_APP" >
    </uses-permission>`enter code here`

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >

        <!-- Add Google Map Library -->
        <uses-library android:name="com.google.android.maps" />

        <activity
            android:label="@string/app_name"
            android:name=".GoogleMapPracticeActivity" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

    <!-- Allow to connect with internet -->
    <uses-permission android:name="android.permission.INTERNET" />
</manifest>

xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <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:apiKey="AIzxxxxxxxxxxxxxxxxxxxxxxxxxxxxMh2JQY"
        android:clickable="true" />

</RelativeLayout>

【问题讨论】:

标签: android


【解决方案1】:

使用 Map v2,您可以从这里找到教程: https://developers.google.com/maps/documentation/android/start

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-30
    • 1970-01-01
    • 2014-02-23
    相关资源
    最近更新 更多