在使用 Google Maps API 的 Android 项目上共享调试密钥 [英] Sharing a debug key on an Android project that uses the Google Maps API

查看:27
本文介绍了在使用 Google Maps API 的 Android 项目上共享调试密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与其他几个使用 Google Maps API 的项目一起开发一个 Android 项目.问题是,目前,我正在将调试 API 密钥硬编码为 MapView 元素上的一个属性.由于我的调试密钥仅在我的机器上有效,因为只有我的机器具有与该密钥绑定的密钥库,所以我可以与我的项目合作伙伴一起正确设置 Google 地图的最佳方法是什么?如果每次我们想让它在我们自己的机器上工作时都必须手动更改硬编码的调试密钥,那将是可怕的.

I am working on an Android project with a few others that utilizes the Google Maps API. The problem is, currently, I am hard-coding my debug API key as an attribute on the MapView element. Since my debug key only works on my machine because only my machine has the keystore tied to that key, what's the best way that I can work with my project partners on getting Google Maps set up properly? It would be horrible if we had to manually change the hard-coded debug key each time we wanted to get it to work on our own machines.

此外,如果这是必要的信息,并非所有人都在使用 Eclipse.

Also, if this is necessary information, not all of us are using Eclipse.

推荐答案

由于我的调试密钥只能在我的机器上使用,因为只有我的机器具有与该密钥绑定的密钥库,所以我可以与我的项目合作伙伴一起正确设置 Google 地图的最佳方式是什么?

Since my debug key only works on my machine because only my machine has the keystore tied to that key, what's the best way that I can work with my project partners on getting Google Maps set up properly?

在这些合作伙伴之间复制您的 debug.keystore 文件.

Copy your debug.keystore file between those partners.

这篇关于在使用 Google Maps API 的 Android 项目上共享调试密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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