android - Android Studio 中的 Eclipse "Custom debug Keystore"相当于什么?

标签 android android-studio

在使用 Google Maps API 时,我习惯于在 Eclipse 中使用自定义调试 key (实际上是我的生产 key )

这种操作让我可以在调试和发布版本中为 map 和大多数 Google Play 服务(应用计费)使用相同的 API key 。

这真的很方便,因为不需要更改 list 中的 key 。

enter image description here

不幸的是,随着迁移到 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/

相关文章:

java - SQLite - 在 Android 应用程序中加速 4,000 行插入

java - Android onRestoreInstanceState 没有完全更新方向变化

java - 在 EditText 中输入数字后,下一个按钮键盘会自动将用户带到不同的 EditText

android-studio - Kotlin:Android Studio 中的 gradle 同步错误

android-studio - 如何一次删除对应的mipmap图标图片?

android - 第三方库证书未添加到 apk

android - 将 ImageView 放置在居中按钮的左侧

java - 只需触摸屏幕即可启动新 Activity

android - aapt错误:存档是 toast

android - 如何在没有手指抬起的情况下检测滑动事件