Android Studio 0.4.+ custom debug keystore

Matthias picture Matthias · Jan 10, 2014 · Viewed 8.7k times · Source

Prior to Android Studio 0.4, I was able to set a custom debug keystore via

File -> Project Structure -> Facets -> Compiler Tab

This option has gone at least with Android Studio 0.4.2. Where can I set the custom keystore for being able to share it over different PCs, e.g. via a VCS?

Answer

Matthias picture Matthias · Jan 10, 2014

This can be solved by adding signingConfigs to the build.gradle configuration.

android {

    // ...

    signingConfigs {
        debug {
            storeFile file('../debug.keystore')
        }

        /*
        release {
            storeFile file('release.keystore')
            storePassword "mystorepassword"
            keyAlias "mykeyalias"
            keyPassword "mykeypassword"
        }
        */
    }