什么是Eclipse&QUOT相当于;自定义调试密钥库"在Android的工作室?

什么是Eclipse&QUOT相当于;自定义调试密钥库"在Android的工作室?

问题描述:

由于我与谷歌地图API的工作,我一直在使用Eclipse的一个自定义的调试工作的关键(也就是实际上我生产的重点)

As I am working with Google Maps API, I have been used to work with a custom debug key in Eclipse (that is in fact my production key)

此操作允许我使用相同的API密钥地图和谷歌大部分的播放服务(在app计费)在我的调试和发布版本。

This manipulation allowed me to use the same API key for Maps and most of Google Play Services (in app billing) in my debug and release build.

这是真的很方便,因为没有必要改变清单中的关键。

This was really convenient because there was no need to change the key in the manifest.

不幸的是,移植到Android的工作室,我缺少这个功能。

Unfortunately, with the migration to Android Studio, I am missing this feature.

任何想法,我可以找到这个选项回来吗?

Any idea where I can find this option back?

感谢了很多。

您定义您build.gradle文件的密钥库中。看到这里的签名配置部分:http://tools.android.com/tech-docs/new-build-system/user-guide

You define a keystore in your build.gradle file. See the Signing Configurations section here: http://tools.android.com/tech-docs/new-build-system/user-guide

在你的情况,你要重新定义密钥库的调试版本:

In your case, you want to redefine the keystore for the debug variant:

android {
    signingConfigs {
        debug {
            storeFile file("your.keystore")
        }
    }
}

不过,你真的应该使用两个不同的密钥库,用于调试和发布配置。

However, you should really be using two different keystores for debug and release configurations.