I've been using Eclipse to develop an android application, and I recently migrated to Android Studio. The apk exported from Eclipse and the apk exported from Android Studio have inconsistent certificates, but are signed using the same keystore and alias. (I get [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
if I try to install one over the other)
To verify the certificate, I ran the command jarsigner -verify -verbose
on both apks (from this answer) and the output is identical, except timestamps.
I also checked the META-INF/CERT.RSA
from each apk by extracting it and running openssl pkcs7 -inform des -in CERT.RSA -out decrypted.txt -print_certs -text
(from this answer) also with identical output.
I tried migrating the project twice, once by importing the Eclipse project directly into Android Studio, and once by exporting gradle build files from Eclipse and importing the gradle project into Android Studio. Both produced the same result.
My app depends on an android library that is a separate project in Eclipse. In Android Studio, the app and library are two modules in the same project. Could this affect the certificate check?
What else could be causing an inconsistent certificate error, besides the certificate itself?
(I'm using Eclipse Luna 4.4.1 with ADT 23.0.4, Android Studio 1.0.1, and Oracle Java JDK 7 on a Ubuntu system.)