gpt4 book ai didi

android - 如何为 Android 生成新的和第二个 Google Maps API key ?

转载 作者:行者123 更新时间:2023-11-30 04:43:04 24 4
gpt4 key购买 nike

我需要为我的 android 应用程序生成一个新的 API key 。但是当我按照 http://code.google.com/android/add-ons/google-apis/mapkey.html 上的步骤操作时它总是给我相同的 key 。我认为我的旧 key 有问题。我怎样才能得到一个不同的新的?

我们将不胜感激。

最佳答案

为 MAP 创建 API key

对于 Debug模式:

1.在cmd中将路径指向C:\Program Files\Java\jdk1.7.0_07\bin>

2.粘贴以下keytool.exe -list -alias androiddebugkey -keystore "c:\users\pradeep.android\debug.keystore"-storepass android -keypass android

3.复制MD5指纹,进入链接https://developers.google.com/maps/documentation/android/v1/maps-api-signup , 将指纹复制到框中并选中复选框点击按钮..

4.Thats it the API key for debug mode is generated.

5.复制 XML 文件中的 AP key ,您必须在其中提供 api key 并运行应用程序。

对于 Release模式:

1.使用eclipse生成keystore

i.Right click the project and android tools-> Export signed application package -> hit next and create a new keystore( Choose a location to store it and don't forget the location . its important).

ii.choose a location and keystore name and password,press next, and give alias name and password for that ,peroid and name and choose the destination file where to store the .apk file and press finish.

2.按照与 Debug模式相同的步骤进行操作。唯一不同的是第二步我们要进入的路径应该是上面的keystore路径(把这个路径c:\users\pradeep.android\debug.keystore替换成创建的路径)。就是这样。

3.其他步骤如下。结束……

将已签名的apk文件加载到您的android设备上,并查看 map 部分

关于android - 如何为 Android 生成新的和第二个 Google Maps API key ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5597534/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com