I have an app on Google Play for years that has seen countless updates. The latest update (the first one in a while) fails to install for some people, they simply get the "Package not signed correctly" error message.
It works for my Android devices I have at home. I'm building and signing with a custom build system that basically boils down to calling ant release
, followed by
jarsigner -verbose -keystore $(keystore) -storepass $(storepass) $(appname).apk $(alias)
zipalign -v 4 $(appname).apk $(finalname).apk
That has worked for years, there were no changes to the build system or keystore, I don't know why it stopped working for some users.
I noticed that the documentation added the following caution:
As of JDK 7, the default signing algorithim [sic] has changed, requiring you to specify the signature and digest algorithims [sic] (-sigalg and -digestalg) when you sign an APK.
So I added -sigalg SHA1withDSA -digestalg SHA1
, which produces an APK with a different size. I can try rolling that out, but I don't want to keep pushing out updates and annoy the users without knowing that I'm actually fixing something.
Why does this only fail for some people? How do I fix it? Is explicitly specifying -sigalg/-digestalg enough?