Google地图未在Android设备上展示.

neo*_*tar 5 android google-maps google-maps-api-3

所以我的问题是谷歌地图没有显示在我的Android设备上使用3.2 API

在寻找这个问题的解决方案时,我已经尝试过在网上找到的大部分建议.

我确实有<uses-permission android:name="android.permission.INTERNET"/>我的清单.

我按照谷歌书面程序制作了一个签名密钥(http://developer.android.com/tools/publishing/app-signing.html#setup)并获得了所述密钥并将其放入布局中android:apiKey="0R8lbu8yQL1Wgw-13s5sUBXZXusi4mEY3EhqWWw"我仍然看到灰色瓷砖而不是地图.

我知道调试密钥在AVD上运行但在android设备上不起作用,而签名密钥应该在设备上工作而不在AVD中.

我愿意尝试另外一步一步的程序来完成这项工作,如果确实如此,我将永远感激不尽.

请帮忙!谢谢!

解:

正在安装错误的apk到设备.不得不做:

adb install <your-file-name>.apk

在控制台中

编辑:

Manifest File

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.googlemaps"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>



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

    <uses-library android:name="com.google.android.maps" />

    <activity
        android:name=".StartActivity"
        android:label="@string/title_activity_start">

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

    </activity>


    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >

    </activity>


    <service
      android:name=".WorldWideMapService"
      android:process=":remote">
      <intent-filter>
        <action
          android:name="com.example.googlemaps.WorldWideMapService" />
      </intent-filter>
    </service>

</application>
Run Code Online (Sandbox Code Playgroud)

jee*_*eet 5

我想纠正你关于应用程序标志,并映射api密钥.

没有这样的东西,比如默认的api键只适用于avd,而不适用于设备.事实上,map api key与Signature KeyStore相关联,正在对其进行签名的应用程序,因此如果使用Default Key对应用程序进行签名,则应使用默认的api密钥.但是,如果您使用自己的密钥库签署应用程序,则应将新密钥库注册到google map api,并获取api密钥.要在Google Play上传,我们需要使用除默认密钥库之外的其他密钥库来签署应用程序,因此我们需要获取发布映射api密钥.

在您的情况下,我认为,您使用默认密钥库签署您的应用程序,而使用不同商店的map api密钥.

是的,问题可能是@Raju提到的.