- Open local.properties and add there keystore location, alias and password:This file must NOT be checked into Version Control Systems, as it contains information specific to your local configuration and password now.
password=your_password keystore=C\:/keystore_location/keystore.jks alias=your_alias
- Add signingConfigs at build.gardle of the module:
android { ... signingConfigs { release { keyAlias alias keyPassword password storeFile file(keystore) storePassword password } } ... }
- Add build types:
android { ... buildTypes { debug { minifyEnabled true proguardFiles getDefaultProguardFile('p.txt'), 'proguard-rules.pro' shrinkResources true } release { minifyEnabled true proguardFiles getDefaultProguardFile('p.txt'), 'proguard-rules.pro' shrinkResources true signingConfig signingConfigs.release } } ... }
- Before running choose build variant: