I have a project on Android gradle project and you are trying to create apk. However, it seems that somehow gradle is picking up the wrong key / certificate.
This is what I have in build.gradle:
signingConfigs {
release {
storeFile file("mykey.jks")
storePassword "mypass"
keyAlias "mykey.key"
keyPassword "mypass"
}
}
buildTypes {
release {
debuggable false
jniDebugBuild false
runProguard true
proguardFile getDefaultProguardFile('proguard-android.txt')
signingConfig signingConfigs.release
}
}
And after launch
gradlew assembleRelease
and taking out META-INF / CERT.RSA from inside .apk, I run the following:
keytool -list -keystore mykey.jks
and
keytool -printcert -v -file CERT.RSA
but they produce output with various certificate prints. Trying with a certificate from another apk signed with the same key (but not with gradle) gives the correct certificate thumbprint.
Gradle seems to be picking up a thin keystore (changing a password or location or an alias makes it stop working).
, - , , . , gradle.
: - . gradle . pkcs # 12 ( .p12). Intellij jarsigner , gradle, - , , , .