android tutorial - Configure the build gradle with signing configuration in android | Developer android - android app development - android studio - android app developement



Configure the build gradle with signing configuration in android

You can define the signing configuration to sign the apk in the build.gradle file. You can define

storeFile
click below button to copy code from our android learning website - android tutorial - team

: the keystore file

storePassword
click below button to copy code from our android learning website - android tutorial - team

: the keystore password

keyAlias
click below button to copy code from our android learning website - android tutorial - team

a key alias name

keyPassword
click below button to copy code from our android learning website - android tutorial - team

: A key alias password

You have to define the signingConfigs block to create a signing configuration:

android {
    signingConfigs {

        myConfig {
            storeFile file("myFile.keystore")
            storePassword "myPasswork"
            keyAlias "aKeyAlias"
            keyPassword "myAliasPassword"
        }
    }
    //....
}
click below button to copy code from our android learning website - android tutorial - team

Then you can assign it to one or more build types.

android {

    buildTypes {
        release {
            signingConfig signingConfigs.myConfig
        }
    }
}
click below button to copy code from our android learning website - android tutorial - team

Related Searches to Configure the build gradle with signing configuration in android