在使用 Google Maps API 时,我习惯于在 Eclipse 中使用自定义调试 key (实际上是我的生产 key )
这种操作让我可以在调试和发布版本中为 map 和大多数 Google Play 服务(应用计费)使用相同的 API key 。
这真的很方便,因为不需要更改 list 中的 key 。
不幸的是,随着迁移到 Android Studio,我缺少此功能。
知道在哪里可以找到这个选项吗?
非常感谢。
最佳答案
您在 build.gradle 文件中定义了一个 keystore 。请参阅此处的签名配置部分:https://developer.android.com/studio/build/index.html
在您的情况下,您想为调试变体重新定义 keystore :
android {
signingConfigs {
debug {
storeFile file("your.keystore")
}
}
}
但是,您确实应该使用两个不同的 keystore 进行调试和发布配置。
关于android - Android Studio 中的 Eclipse "Custom debug Keystore"相当于什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17189076/