什么是Eclipse&QUOT相当于;自定义调试密钥库"在Android的工作室? [英] What is the equivalent of Eclipse "Custom debug Keystore" in Android studio?

查看:152
本文介绍了什么是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文件的密钥库中。看到这里的签名配置部分:<一href="http://tools.android.com/tech-docs/new-build-system/user-guide">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.

这篇关于什么是Eclipse&QUOT相当于;自定义调试密钥库&QUOT;在Android的工作室?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆