Android的图形页面 - 瓷砖调试API密钥不加载 [英] Android MapView - tiles not loading with Debug API key

查看:93
本文介绍了Android的图形页面 - 瓷砖调试API密钥不加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些问题让瓷砖加载到我的android开发图形页面。我已搜查,看着类似的问题就在这里,但没有运气这么远。<​​/ P>

我看了看说明这里并有我的调试API密钥的保持。我已经进入我的MapView这一点。

我已经检查了我的模拟器和我的调试设备已经得到一个互联网连接。

我已经把我的上网权限标签在我的清单文件是应用程序标记之前。

我不知道要检查什么。

我也不清楚的最佳方式来开发这一点。看来,作为调试密钥库需要相同的密码,我不能用正确签名的应用程序调试 - 机器人。这意味着,每一次我去做一个发布版本我必须要改变的关键 - 这似乎很脆弱。

有没有发展和释放我自己生成的地图API密钥生成?什么办法

有些code你看一下:

main.xml中:

 &LT; com.google.android.maps.MapView
    机器人:ID =@ + ID /图形页面
    机器人:layout_height =FILL_PARENT
    机器人:layout_width =FILL_PARENT
    机器人:apiKey =??:?:?:?:?:?:?:?:?:?:?:?:?:?:?: ??
    /&GT;

AndroidManifest.xml中:

 &LT;清单
的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
安卓版code =1
机器人:=的versionName1.0
包=com.my.package.name
&GT;&LT;采用-SDK安卓的minSdkVersion =3&GT;&LT; /使用-SDK&GT;&LT;使用许可权的android:NAME =android.permission.ACCESS_FINE_LOCATION/&GT;
&LT;使用许可权的android:NAME =android.permission.INTERNET对/&GT;&lt;应用
    机器人:图标=@绘制/图标
    机器人:标签=@字符串/ APP_NAME
    机器人:可调试=真
    &GT;    &LT;活动
        机器人:MyMainClassNAME =
        机器人:标签=@字符串/ APP_NAME
        &GT;
        &所述;意图滤光器&gt;
            &lt;作用机器人:名字=android.intent.action.MAIN/&GT;
            &LT;类机器人:名字=android.intent.category.LAUNCHER/&GT;
        &所述; /意图滤光器&gt;
    &LT; /活性GT;    &LT;使用库机器人:名字=com.google.android.maps/&GT;&LT; /用途&gt;
&LT; /清单&GT;

任何帮助非常AP preciated。


解决方案

  

的android:apiKey =??:?:?:?:?:?:?:?:?:?:?:?:?:?: ??:??


您有冒号在那里表明,也许你误以为你应该在贴什么的事实。

冒号都在签名密钥的MD5指纹。然后,您需要粘贴在谷歌网站的东西插入到表单并获取回实际的签名密钥,这将是这样的:

 的android:apiKey =00yHj0k7_7vzHbUFXzY2j94lYYCqW3NAIW8EEEw

I am having some issues getting tiles to load into my MapView in android development. I have searched and looked at similar problems on here but with no luck so far.

I have looked at the instructions here and have got hold of my debug API key. I have entered this into my MapView.

I have checked that my emulator and my debug device have got an internet connection.

I have move my Internet permission tag in my manifest file to be before the application tag.

I don't know what else to check.

I am also unsure of the best way to develop this. It seems that I can't debug with a properly signed app as the debug keystore needs the same password - android. This would imply that each time I go to do a release build I have to change the key - which seems very fragile!

Is there any way of developing and releasing builds with my own generated maps API key?

Some code for you to look at:

Main.xml:

<com.google.android.maps.MapView
    android:id="@+id/mapView" 
    android:layout_height="fill_parent" 
    android:layout_width="fill_parent"
    android:apiKey="??:??:??:??:??:??:??:??:??:??:??:??:??:??:??:??"
    />

AndroidManifest.xml:

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

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

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />

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

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

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

</application>
</manifest> 

Any Help much appreciated.

解决方案

android:apiKey="??:??:??:??:??:??:??:??:??:??:??:??:??:??:??:??"

The fact that you have the colons in there suggests that perhaps you mistook what you're supposed to paste in.

The colons are in the MD5 fingerprint of the signing key. You then need to paste that stuff into a form on a Google Web site and get back the actual signing key, which will look like:

android:apiKey="00yHj0k7_7vzHbUFXzY2j94lYYCqW3NAIW8EEEw"

这篇关于Android的图形页面 - 瓷砖调试API密钥不加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆