"Package file was not signed correctly" - Android

So… I’m pretty confused at this point because the only information I can find is from a 2013 thread… Just published my app on android and right away get an email from one of my testers that they are getting a “Package file was not signed correctly” error and they can’t open the app.

I’m using a Mac, and the previous thread said that this is a Java issue. The Android SDK requires Macs to run on JRE 6 (from what it said in 2013) and I am using JRE 7. Is that still the problem? If it is… how do I switch from JRE 7 to 6? 

Not finding very much luck here on these forums or stack overflow. I’m sure I can’t be the only one with this issue.

Any help here would be greatly appreciated…

Hi @sam16,

Since you’re not (apparently) getting errors from Corona, there is probably something wrong with your Android keystores. So basically, no different/particular Java version will remedy this. Did you read the following guide on how to properly generate keystores and build your Android app for “release”?

https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

Best regards,

Brent

Hi Brent, 

Unless I am missing something here I feel like there was one step in generating the keystore that is pretty hard to mess up. I generated the keystore using the following information and received no errors from Corona. 

keytool -genkey -v -keystore ultimatestacktrainer.keystore -alias ultimatestacktrainer -keyalg RSA -validity 999999

Also, I’ve published an app to the google play store in April and seemed to have no issues. I did this through GameSalad though. So, I’m not sure where the issue is.

Note you can sign all of your apps with the same keystore, you don’t need a new one for each app.  

Edit - This is assuming your new app hasn’t been published yet using a different keystore

I have already published the app. But I don’t mind republishing it. It seems like the problem is not with the keystore but the app signing process in some way. What could be wrong with the keystore? Wouldn’t corona give me an error if there was something wrong with it? I did not find out there was something wrong until a tester downloaded it from the app store.

I don’t know.  But to test if it is a keystore problem I would try publishing it with your first keystore to see if that helps.  If it doesn’t, then you’re right it is something to do with the signing process.

I don’t know what I did… but I restarted my computer, downloaded a whole bunch of different versions of Java JRE and JDK, reinstalled xCode(although I dont think it had anything to do with my Android problem), entered a bunch of different stuff in Terminal to switch versions, deleted and reinstalled every signing certificate I had, and a whole bunch of other stuff that may or may not be related to my problem… and somehow it works now! The keystore I made for this app works, so I didn’t need to republish although I was just about to. 

Hi @sam16,

Since you’re not (apparently) getting errors from Corona, there is probably something wrong with your Android keystores. So basically, no different/particular Java version will remedy this. Did you read the following guide on how to properly generate keystores and build your Android app for “release”?

https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

Best regards,

Brent

Hi Brent, 

Unless I am missing something here I feel like there was one step in generating the keystore that is pretty hard to mess up. I generated the keystore using the following information and received no errors from Corona. 

keytool -genkey -v -keystore ultimatestacktrainer.keystore -alias ultimatestacktrainer -keyalg RSA -validity 999999

Also, I’ve published an app to the google play store in April and seemed to have no issues. I did this through GameSalad though. So, I’m not sure where the issue is.

Note you can sign all of your apps with the same keystore, you don’t need a new one for each app.  

Edit - This is assuming your new app hasn’t been published yet using a different keystore

I have already published the app. But I don’t mind republishing it. It seems like the problem is not with the keystore but the app signing process in some way. What could be wrong with the keystore? Wouldn’t corona give me an error if there was something wrong with it? I did not find out there was something wrong until a tester downloaded it from the app store.

I don’t know.  But to test if it is a keystore problem I would try publishing it with your first keystore to see if that helps.  If it doesn’t, then you’re right it is something to do with the signing process.

I don’t know what I did… but I restarted my computer, downloaded a whole bunch of different versions of Java JRE and JDK, reinstalled xCode(although I dont think it had anything to do with my Android problem), entered a bunch of different stuff in Terminal to switch versions, deleted and reinstalled every signing certificate I had, and a whole bunch of other stuff that may or may not be related to my problem… and somehow it works now! The keystore I made for this app works, so I didn’t need to republish although I was just about to.