如何配置的Andr​​oid地图SDK V2使用不同的密钥进行生产和发展?密钥、不同、地图、Andr

2023-09-04 23:35:54 作者:清盏涂墨衣

我想自动设置不同的Andr​​oid地图API V2键进行开发和生产。

I want to automatically set different android map api V2 keys for development and production.

推荐答案

登录到谷歌API控制台 在简单API访问,点击编辑允许Android应用程序......右侧 每行输入一个SHA-1指纹像指示说:

Log in to Google APIs Console Under "Simple API Access" click "Edit Allowed Android apps..." on the right side Enter one SHA-1 fingerprint per line like the instructions say:

一SHA1证书指纹和包名每行(用分号分隔)。例如: 45:B5:E4:6F:36:AD:0A:98:94:B4:02:66:2B:12:17:F2:56:26:A0:E0; com.example 45:B6:E4:6F:36:AD:1A:98:94:B4:02:66:2B:12:17:F1:56:26:A0:E0; com.example

"One SHA1 certificate fingerprint and package name (separated by a semicolon) per line. Example: 45:B5:E4:6F:36:AD:0A:98:94:B4:02:66:2B:12:17:F2:56:26:A0:E0;com.example 45:B6:E4:6F:36:AD:1A:98:94:B4:02:66:2B:12:17:F1:56:26:A0:E0;com.example"

现在,只要使用同一个简单的API密钥,它会为您的调试和发布证书,而无需改变任何东西。

Now, just use the same "Simple API key" and it'll work for your debug and publish certificate without having to change anything.