Android的谷歌地图V2 - 调试键VS释放键 [英] Android Google Maps v2 - Debug key vs Release key

查看:152
本文介绍了Android的谷歌地图V2 - 调试键VS释放键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我清楚怎么去调试密钥,使用谷歌地图V2库的使用,以及如何得到释放键。目前我的清单文件的相关部分如下所示:

it is clear to me how to get a debug key for use with Google Maps v2 library, and also how to get a release key. Currently the relevant section of my manifest file looks like this:

<!-- Debug -->
<meta-data
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="[my debug key here]"/>

<!-- Release        
<meta-data
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="[my release key here]"/>
-->

相关的主要是未加注释的,另一种是注释。

The relevant key is uncommented, the other one is commented.

任何人都可以表明一个舒适的方式来避免这种烦恼注释/取消注释这些作品清单文件中,每次调试,而不是发行版本是需要的?

Can anyone indicate a comfortable way to avoid this annoyance of commenting/uncommenting these pieces of manifest file everytime a debug rather than release version is needed?

推荐答案

随着第2版的API,你可以使用相同的密钥进行发布和调试。在您的谷歌API的控制台编辑您的允许Android应用程序,并在每行把你的调试/释放键,然后将您的应用程序名称。您可以使用多条线路,那么它会与这两个键。

With version 2 API's you can use the same key for release and debug. In your google api's console edit your allowed android apps and on each line put your debug/release key, and then your app name. You can use multiple lines, then it will work with both keys.

这篇关于Android的谷歌地图V2 - 调试键VS释放键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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