同一 Android 项目中的多个 API 密钥 [英] Multiple API keys in the same Android project

查看:34
本文介绍了同一 Android 项目中的多个 API 密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在同一代码库中为 Google Maps Android API 指定多个键?

Is it possible to specify multiple keys for Google Maps Android API in the same code base?

每次更改密钥库时,我似乎都必须更改清单文件中的密钥.这不是很方便,恕我直言,如果您需要测试使用密钥签名的应用程序并发布密钥库.

It looks like I have to change the key in manifest file each time I change keystore. It's not very convenient, imho, if you need to test the app signed with keys form debug and release keystores.

推荐答案

我认为这不是您想要做的.您应该在 Google Developer API Console 上将调试和发布 SHA1 密钥添加到 API 密钥.看看这个答案

I don't think this is what you want to do. You should add both debug and release SHA1 key to API key on Google Developer API Console. Take a look at this answer

这篇关于同一 Android 项目中的多个 API 密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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