While building signed release APK I've come across the following: if I build signed apk from android studio (via Build
-> Generate Signed APK...
) with build.gradle
file like this (only relevant parts):
signingConfigs {
release {
storeFile file('/keystore/location/mykeystore.keystore')
storePassword 'storepassword'
keyAlias 'key'
keyPassword 'keypassword'
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
The resulting apk fingerprint is YY:YY
.
However, if I build my APK from console as described here with build.gradle
like this:
buildTypes {
release {
}
}
And sign it with the same keystore file, the resulting apk fingerprint is XX:XX
.
Also, both SHA fingerprints are different from my debug certificate SHA fingerprint. What's the cause of such behaviour?
I'm using buildToolsVersion 23.0.0
android studio gradle version 1.3.0
android sdk tools version 24.3.4
android studio version 1.3.1
Build Type
release. When building from console I run./gradlew assembleRelease
. – SubcortexMessages
tool window of Android Studio which command it is executing. That way you can make sure it is runningassembleRelease
– Livengood./gradlew assembleRelease
with the same build.gradle as the first one (i.e. specifying signingConfig), I get the apk with SHA fingerprintXX:XX
, notYY:YY
. – SubcortexassembleRelease
. – Subcortex