I have the following key store info store in keystore.properties
in root folder
storePassword=******
keyPassword=******
keyAlias=******
storeFile=/home/jerry/jerryKeyStore
and the following gradle code to load it
// Create a variable called keystorePropertiesFile, and initialize it to your
// keystore.properties file, in the rootProject folder.
def keystorePropertiesFile = rootProject.file("keystore.properties")
// Initialize a new Properties() object called keystoreProperties.
def keystoreProperties = new Properties()
// Load your keystore.properties file into the keystoreProperties object.
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
When I open the signing tab of project structure window, Android Studio reads Unrecognized value
in all signing fields.
It also can't install the APK on my device, throwing an error that APK was built with different key.. as I built it with signing info written directly into the gradle file
I use the following
Android Studio: 2.1.2
Gradle: 2.1.0
Make sure you have:
buildTypes {
debug {
signingConfig signingConfigs.debug
......
}
release {
signingConfig signingConfigs.release
...
}
}
in module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With