如何将 Android 调试密钥库放入 subversion 存储库,然后让 Eclipse 使用它?

发布于 2024-11-06 17:19:23 字数 566 浏览 0 评论 0原文

为了使用 Google Maps API,Google 需要密钥库的 MD5 指纹:

  • 要在 MapView 中显示地图数据,您需要注册一个 Maps API 密钥
  • 每个 Maps API 密钥都与一个特定的证书唯一关联,该证书基于证书的 MD5 指纹
  • 您可以在开发者身份下注册多个证书
  • 您可以根据您的调试证书获取临时 Maps API Key,但在发布应用程序之前,您必须根据您的发布证书注册新的 Key 并更新引用在您的 MapViews 中相应地

我们有多个人将使用 Google Maps API,我们正在使用 Subversion 来跟踪一切。如果所有开发人员都简单地指向同一个密钥库,这似乎会容易得多,但 Eclipse IDE 似乎没有一种方法可以指向多个密钥库,并且每个开发人员都在多个项目上工作。

有没有一种方法可以让 Eclipse 使用当前 Subversion 存储库中的密钥库而不会出现麻烦(即不必一直更改首选项)?

或者是否应该有一个新的 SVN 存储库专门用于管理我们所有开发人员的调试密钥库?

您在您的组织中是如何做到这一点的?

In order to use the Google Maps API, Google requires the MD5 fingerprint of a keystore:

  • To display Maps data in a MapView, you need to register for a Maps API Key
  • Each Maps API Key is uniquely associated with a specific certificate, based on an MD5 fingerprint of the certificate
  • You can register multiple certificates under your developer identity
  • You can get a temporary Maps API Key based on your debug certificate, but before you publish your application, you must register for a new Key based on your release certificate and update references in your MapViews accordingly

We have multiple people who are going to be using the Google Maps API and we are using Subversion to track everything. It seems a lot easier if all the developers simply point at the same keystore but the Eclipse IDE doesn't seem like it has a way to point at more than one keystore and each developer works on multiple projects.

Is there a way to get Eclipse to use a keystore in the current Subversion repository without being a hassle (i.e. without having to change preferences all the time)?

Or should there be a new SVN repository dedicated solely to managing the debug keystore for all of our devs?

How are you doing this at your organization?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

哭泣的笑容 2024-11-13 17:19:23

基本上,默认的调试密钥存储存储在
/Users/{NAME}/.android/debug_keystore

  1. 将 SVN Repository 和 Checkout 设置到包含文件“debug.keystore”的计算机
  2. 在 Eclipse 中,文件 -> 首选项 -> Android -> 构建。
  3. 将“自定义调试密钥库”设置为 SVN 签出目录中的“debug.keystore”文件

http://chrislee.kr/wp/2010/12/31/share-google-android-api-key-in-eclipse-with-other -团队成员/

Basically, default debug keystore is stored in
/Users/{NAME}/.android/debug_keystore

  1. Set SVN Repository and Checkout to the computer, which contains the file “debug.keystore”
  2. In Eclipse, File->Preference->Android->Build.
  3. Set “Custom debug keystore” to “debug.keystore” file in SVN Checkout Directory

http://chrislee.kr/wp/2010/12/31/share-google-android-api-key-in-eclipse-with-other-team-members/

鹤舞 2024-11-13 17:19:23
  1. 如果将所有开发人员调试密钥添加到 google-play-services 并为所有开发人员生成一个 Api 密钥,会更容易。对于所有开发人员来说,从存储库获取调试密钥并在 Eclipse 中设置它要复杂得多。 Google Maps Api v2 肯定允许添加多个 SHA1;com.package.name 行来获取一个 Api 密钥..(顺便说一句,这是这样做的方法..)

  2. 将地图密钥放入 string.xml 资源中file 可能是最不安全的解决方案。 Apk 可以相对容易地进行逆向工程,最容易读取的文件是资源(在这些 xml 文件中)

  3. 仅针对调试密钥制作存储库是一种开销方式...

也许这只是我......但是......

我希望这个答案真正帮助你和其他人......;)

  1. It is easier if you add all developers debug keys to google-play-services and generate one Api key for all of them. Much more is complicated for all of developers to get debug key from repo and setup it in eclipse. Google Maps Api v2 for sure allows to add more then one SHA1;com.package.name lines to get one Api key.. (btw that is the way to do it..)

  2. Puting maps key in string.xml resource file is probably the most unsecure solution. Apk can be relatively easy reverse engineered and the easiest files to read are resources (among those xml files)

  3. Making repo just for debug keys is IMHO way to overhead...

maybe it is just me..but..

I hope this answer really helped you and others.. ;)

雨巷深深 2024-11-13 17:19:23

我们最终将 Maps 键放入 strings.xml 文件中,然后以这种方式引用它。有几种不同的方法可以在我们的应用程序中启动 MapActivity。这样,当我们准备好时,就可以轻松上线 - 只需将密钥替换到一个位置,然后就可以提交到市场了。

我们还建立了一个 Subversion 存储库,其唯一目的是存放调试密钥库和 Maps API 密钥以及未来特定于密钥库的任何其他内容。现在,所有开发人员都指向 Eclipse 中的单个调试密钥库,并且该应用程序运行得非常顺利。

We ended up putting the Maps key into the strings.xml file and then referencing it that way. There are a couple of different ways to start a MapActivity in our application. So that makes it easy to go live when we are ready - just replace the key in the one location and then it is basically ready to submit to the Market.

We also set up a single Subversion repository whose sole purpose in life is to house the debug keystore and Maps API keys and anything else in the future that is keystore-specific. All of the developers now point at that single debug keystore from within Eclipse and the app works like a charm.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文