Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Published Android apk gives error "Package file was not signed correctly"

I recently uploaded my application to the android market however it's refusing to run when downloaded due to the error

Package file was not signed correctly

I first published the packet using eclipse, right click export, creating a keystore then publishing, however it refuses to work.

I then downloaded the keytool and jarsigner and used them to sign an upgrade which I posted instead. However this gives the same error.

I have no idea what I've done wrong, and since I cannot delete the application I cannot try and start again can anyone help me?

Thanks

like image 736
David Read Avatar asked Mar 25 '10 21:03

David Read


People also ask

Why does an APK need to be signed?

Application signing ensures that one application cannot access any other application except through well-defined IPC. When an application (APK file) is installed onto an Android device, the Package Manager verifies that the APK has been properly signed with the certificate included in that APK.

Are APK files signed?

Android requires that all APKs be digitally signed with a certificate before they are installed on a device or updated. When releasing using Android App Bundles, you need to sign your app bundle with an upload key before uploading it to the Play Console, and Play App Signing takes care of the rest.

What is unsigned APK?

Unsigned Apk, as the name suggests it means it is not signed by any Keystore. A Keystore is basically a binary file that contains a set of private keys. Every App that we install using the Google Play App Store needs to be signed with a Keystore.


2 Answers

You have your debug copy still installed on your device most likely. Now you have downloaded a different copy of the same app and it's causing this error.

Uninstall the app completely from your device. Then download it from the market again and it should work.

like image 150
Mark B Avatar answered Nov 04 '22 13:11

Mark B


OK I had this same issue and none of the suggested resolutions worked for me. I was signing my app the same way I have been for 2 years and the Android Market was accepting it fine, just users could not download it from the Market with the "Package Not Signed" error.

What it turned out to be was for another project I am working on I had JDK7 installed. It became the default JDK and for some reason the keytool for JDK7 is signing the package in a way that Android must not like. So I reverted to JDK 1.6.0_23 and re-ran my build and put it on the Market and everything went back to normal.

I hope this helps someone else.

like image 23
Melloware Avatar answered Nov 04 '22 13:11

Melloware