Google 地图发布 API 密钥无效

Google map Release API Key not working

您好,我正在使用 google 地图 API,但我在创建发布 APK 时遇到了问题。但是 Map 在调试版本中运行良好。我按照 android 的 link. First I got SHA1 key by typing in terminal keytool -list -v -keystore your_keystore_name -alias your_alias_name. Using this key I created An API key from Google Developer Console 创建了 API 密钥以供发布。我做错了什么吗?请帮助我。

我得到了解决方案。我在错误的位置添加了 API 键。我错误地在 src/debug/res/values/google_maps_api.xml 中添加了 release API key。当我将它复制到 src/release/res/values/google_maps_api.xml 时,它起作用了。