0

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Eliasz Kubala
  • 3,836
  • 1
  • 23
  • 28

3 Answers3

1

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

  1. 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)
  2. Paste zipalign.exe to folder with my app-release-unaligned.apk
  3. 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 ;)

Eliasz Kubala
  • 3,836
  • 1
  • 23
  • 28
0

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

Community
  • 1
  • 1
maxandron
  • 1,650
  • 2
  • 12
  • 16
  • You don't understood my question. I do not delete or modify my JKS file. I have the same. But the JKS work with Android Studio 0.4.3 but not with 141.xxxx. Any idea for that? – Eliasz Kubala Aug 29 '15 at 16:11
  • I just sign apk with 0.4.2 and it's okey apk for Play Store. So, JKS it's okey. – Eliasz Kubala Aug 29 '15 at 16:51
  • 1
    Are you sure your apk was signed with your keystore file and not with the default one? You should have the following line in your gradle release build: signingConfig signingConfigs.myKey – maxandron Aug 29 '15 at 16:55
0

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.

Community
  • 1
  • 1
Sergey Shustikov
  • 15,377
  • 12
  • 67
  • 119