Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent of Eclipse "Custom debug Keystore" in Android studio?

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.

like image 346
Waza_Be Avatar asked Jun 19 '13 10:06

Waza_Be


People also ask

Where can I find debug keystore?

The default keystore file: debug. keystore is present in the folder . android which is usually located in the default home folder of your operating system of the user who installed that Android SDK.

What is password for debug keystore in Android?

Usually the debug. keystore password is just "android". You can delete it and Eclipse will automatically generate a new one, as described here.


2 Answers

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.

like image 147
Siva Velusamy Avatar answered Sep 23 '22 00:09

Siva Velusamy


On recent Android Studio 0.8.9 you will find this at a way better place:

 File->Project Structure 
  1. Add a keystore at "Signing" Tab
  2. Select it for your debug/release "Build types".
  3. Make sure the alias name matchs with your keystore (keytool -list -v shows your alias name)

It creates the gradle stuff, syncrhonizes automatically on "Apply" and worked immediately like a charm.

like image 20
John Avatar answered Sep 24 '22 00:09

John