English 中文(简体)
Android Maps Api 释放密钥无效
原标题:Android Maps api release key not working
  • 时间:2012-05-21 23:48:33
  •  标签:
  • android

我查看了所有与此相关的堆积流问题, 但毫无效果。 抱歉, 如果已经问了的话 。

我将谷歌的地图 appi 融入了我的应用程序, 开发过程中一切都很好。 我有一个调试 Api 密钥基于调试. keystore 文件, 它很好工作。

然后,我接着根据我用来签署应用程序的键盘文件得到了一个释放api 键。 然而,我看到的只是灰砖—— 地图没有显示。 我的 < b> 应用程序标签 内有 < b> library < /b> 标签 。 我拥有在列表中的互联网权限, 以及 < b > 和roid:debuggable="false" (虽然这似乎没有改变任何东西 ) 。

我还能漏掉什么?

问题回答

我也有同样的问题

我是如何解答的: < / 坚固>

It is important to make a new(!) API key for your release-keystore because the old API key generated for debug keystore will not work with release keystore. Here it is the procedure how to do it: https://developers.google.com/maps/documentation/android/mapkey#getfingerprint

简言之:

  1. 为您的密钥塔制作指纹( MD5), 例如用此批次文件 :

    @echo off "c:Program FilesJavajdk1.7.0inkeytool.exe" -v -list -keystore my-release-key.keystore > my-release-md5-fingerprint.txt

    将您 Google api 键 (md5) 保存到文件的回响( md5), 我的 - 释放 - md5 - 手指打印. txt

    暂停暂停

  2. Go to the google site where APi is generated: http://code.google.com/android/maps-api-signup.html

And copy-paste to the appropriate field your MD5 fingerprint which looks like the following 94:1E:43:49:87:73:BB:E6:A6:88:D7:20:F1:8E:B5:98 (no extra spaces or additional symbols allowed).

您应该从另一个链接中创建一个释放键。 调试键和释放键是不同的。 请参见这里的“ 如何创建调试键和释放键的不同 ” : < a href=" http:// chocotech. blogspot. com/2012/10 get- debug- key- and- release- key- for. html" rel= “ nofollow” > http://chocotech. blogspot. com/2012/10 get- debug- key- and- release- key- for. html

在您的地图视图中, 您必须指定您的 ApiKey :

<com.google.android.maps.MapView
    android:id="@+id/mapView"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:apiKey="@string/mapKey"
    android:layout_below="@+id/email"
    android:clickable="true"
    android:enabled="true" >
</com.google.android.maps.MapView>

地图键是您 ApiKey (这里我在我的字符串里定义它) 。





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签