Generate signed APK after update Android Studio - android

I have really strange problem. Years ago I write an App which was written in Eclipse. Then I upgraded to Android Studio 0.4.3 Everything was work correctly but now I delete this AS and work with new version (Android Studio 141.xxxx).
The problem is, that I use the same JKS certificate, but after upload
to Google Play Store I see communicate about difference in finger
print.
You uploaded an APK that is signed with a different certificate to
your previous APKs. You must use the same certificate. Your existing
APKs are signed with the certificate(s) with fingerprint(s):
[ SHA1: D0:D9:BE:8B:D2:6A:5F:xxxxxxxxxxxxxxxxxxxx:F4:D9:91:66:06:12 ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: DA:53:9F:A7:D3:3C:8D:xxxxxxxxxxxxxxxxxxxx:CE:1F:F2:AB:0B:64 ]
I tried sign my app manual but then I have this communicate.
Upload failed You uploaded an APK with invalid or missing signing
information for some of its files. You need to create a valid signed
APK. Learn more about signing.
Anyone have an idea? Here is similar question but without answer.

Okey... Finally I resolve this Issue. But I still don't know why it occurs.
Firstly I make sure that I use the same jks before
jarsigner -verify -verbose:summary -certs old.apk
jarsigner -verify -verbose:summary -certs new.apk
Certificates looks the same. So I build my application and sign this with my certificate. But it doesn't work.
So I made it manually
I open my apk file with WinRAR and then, delete META-INF dir from app-release-unaligned.apk (app\build\outputs\apk in my case)
Paste zipalign.exe to folder with my app-release-unaligned.apk
Open CMD in folder with your apk (shift + right click + "Open command window here.")
Then I use manually jarsigner and then zipalign.exe.
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore key.jks -storepass MYPASSWORD app-release-unaligned.apk 1
zipalign -f -v 4 app-release-unaligned.apk app-release.apk
Then I upload app-release.apk to Google Console. Everything works great ;)

The problem I believe you have is that you uploaded your apk without using your own key-store file.
The file might have changed between IDE versions.
refer to this answer for an explanation on why this is a problem:
https://stackoverflow.com/a/4843261/3497739
Also read this reference page to understand how to properly sign your apk
https://developer.android.com/tools/publishing/app-signing.html
Good luck

Probably problem in keystore.
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):
[ SHA1: D0:D9:BE:8B:D2:6A:5F:xxxxxxxxxxxxxxxxxxxx:F4:D9:91:66:06:12 ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: DA:53:9F:A7:D3:3C:8D:xxxxxxxxxxxxxxxxxxxx:CE:1F:F2:AB:0B:64 ]
That means that you use incorrect keystore, not the keystore which you used to sign the previous version of APK.
Make sure that you use the same keystore file. If it the same - re-generate key again.

Related

Android app cannot be updated in Google play store

I tried to update my app at play Store but received the following msg
Upload failed
You uploaded an APK that is signed with a differentcertificate to your previous APKs.
You must use the same certificate.
Your existing APKs are signed with the certificate(s) with
fingerprint(s):
I've do some search here and google. Results are mainly talking about using wrong keystore, key invalid or key is outdated.
So, I do the following
Download the published apk from google play console
keytool -list -printcert -jarfile published.apk
keytool -list -keystore /xxx/xxx/xxx.keystore
Potential problem
1. Using wrong keystore / key
2. Key expired
Fingerprint from published.apk and the xxx.keystore are match
Valid date of apk till 2044
Both potential problem 1 and 2 should not be a problem now.
Any idea? Am I missing something?

upload failed You uploaded an APK that is signed with a different certificate to your previous APKs

I need to update my app in google play store, but I generated apk file on another computer that the previous one. I used the same keystore file (lazymojo.jsk) and I get an error about using different SHA1 certificate. Then I switched to my old pc where i made the first version and generate signed apk, but it gives me the same error again.
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):
[ SHA1: 58:EA:40:73:F8:0E:7F:07:A7:0B:C3:EE:FB:FA:22:50:18:CF:53:4E ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: 6F:12:B6:7B:7F:55:8C:F9:98:B3:78:41:8A:9E:EB:E6:99:7B:91:45 ]
I used same keystore file and password.
Please help me i am new in android developing. Thanks in ad=vance
Please make sure you have used the same Key alias as well. I faced the same error when changed Key alias to a new one.
this solution works for me (but you should find your original keystore)
Download your orginal apk from play store
Deplace your apk to java\jdk...\bin
Open cmd windows and move to the directory with where your file apk
Execute this comand "keytool -list-printcert -jarfile yourfile.apk"
this command will return all infrmation about your file apk
(keystore and password)
Find your keystore (.jks)
Generate your new apk from your keystore
by mistake I was generating in debug and uploading it so make sure you are uploading release type from build.gradle !

App signed with multiple certificates rejected

I'm trying to upgrade my app (developed with appinventor 1.0) on google play. I'm using the same keystore but I get the following message (sorry the ignorance, not sure it matters but for security I changed some of the keys below after SHA1:):
Upload failed
Your APK has been signed with multiple certificates. Please only sign it with one certificate and upload it again.
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):
[ SHA1: A6:D5:E5:66:34:84:B5:31:8E:8F:79:D7:2A:38:B1:54:5E:29:27:22 ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: A6:D5:E5:66:34:84:B5:31:8E:8F:79:D7:2A:38:B1:54:5E:29:27:22,
SHA1: 0D:28:AC:88:7C:D8:FD:0C:BA:A7:46:BC:70:7E:EA:37:9F:A1:CC:84 ]
I am using jarsigner and zipalign afterwards. The first part of the SHA1 is reproduced exactly, but there is an extra SHA1 after a comma.
Any clue ?
Probably you are using the same keystore, but not the same certificate. To update your application you need to use the exactly same configuration (keystore and certificate) you used to submit it.
My guess is that there is another signature present in your apk.
Rename .apk file to .zip and remove any signatures present. Then rename back and do jarsign and zipalign.

Signed Package, Am I ready now?

after doing right-click on package -> Export signed application package... -> verify with valid keystore i got an APK.
To get sure i used jarsigner to check if my app is correctly signed.
$ jarsigner -verify -verbose -certs my_application.apk
and i got jar verified as response.
Is my APK now correctly signed with a release key? Ready to upload?
Also how can i check, like it is recommended by the android documentation, my signed apk on my phone? (To check if proguard didn't cut of something which is necessary for my app and so on..)
Any help is appreciated.
If your APK is not signed correctly, you will not be able to upload it to the Play-Store.

Can't upload updated android application to play store. Previous certificate fingerprint is blank

After I try to upload an updated APK to the play store I get this error:
Upload failed
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):
[ ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: FB:BC:61:54:B3:26:6C:73:92:68:65:EA:0C:81:69:81:2B:39:21:66 ]
So I have to find a keystore with...no fingerprint. Can I upload an unsigned APK? I haven't updated the app in years, but I'm still using the only keystore I've ever used.
Edit, I downloaded the live app from the play store. I can't figure out how to get a signature fingerprint, but the keystore I'm using expires the exact same minute that the live application does (in 2036) so it's definitely the key I'm trying to use.
you can't upload an unsigned APK on GooglePlay.
[http://developer.android.com/tools/publishing/preparing.html][1]
Maybe your keystore expired. Do you remember the validity period you set when you originally generated it
It must have been some sort of error on Google's end. They fixed the problem on their end after I opened a support ticket.
My APK uploads now with no modification on my part.
this solution works for me (but you should find your original keystore)
1.download your orginal apk from play store
2.deplace your apk to java\jdk...\bin
3.open cmd windows and move to the directory with where your file apk
4.execute this comand keytool -list-printcert -jarfile yourfile.apk this command will return all information about your file apk (keystore and password)
5.find your keystore (.jks)
6.generate your new apk from your keystore

Categories

Resources