Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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)

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.

enter image description here

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

Any idea where I can find this option back?

Thank a lot.

question from:https://stackoverflow.com/questions/17189076/what-is-the-equivalent-of-eclipse-custom-debug-keystore-in-android-studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
229 views
Welcome To Ask or Share your Answers For Others

1 Answer

You define a keystore in your build.gradle file. See the Signing Configurations section here: https://developer.android.com/studio/build/index.html

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...