Certificate chain not found, how to fix and publish to Google Play Store?

懵懂的女人 提交于 2019-11-28 04:20:28

keytool -keystore formconnect.keystore -list -v

You can use this command to find out your alias name after you have generated your key.

First line of execution contains the Alias name: <value> If keytool is used then alias name might be "mykey".

Use that alias name while packaging the application.

i had the same issue my commands were

to generate key

 keytool -genkey -v -keystore testapp-key.keystore -alias testapp-key -keyalg RSA -keysize 2048 -validity 10000

and then i did this to sign the app

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore testapp-key.keystore testapp.apk testapp

i got this error

jarsigner: Certificate chain not found for: testapp.<br/>
project_foo must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

then i replaced the alias 'testapp' in the jarsignir command with the key alias that is 'testapp-key' it is in first command i.e. key generation command

the command will look like this

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore testapp-key.keystore testapp.apk testapp

in your case it will be like this

 jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore C:\Path\\.keystore Foo.apk your-key-alias

The Developer on our team proposed the solution that fixed the problem. Previously I had copied the Foo.apk into the directory with the jarsigner.exe and tried to run it there. He proposed:

  1. Set the PATH environment variable so Windows can find the jarsigner executable.
  2. Move the Foo.apk to the path where the keystore was located.
  3. Run the command below (without using a path to find the keystore).
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore .keystore Foo.apk project_foo

It works! Removing the necessity to specify file path for the keystore fixed the problem.

add release unsigned.apk folder path

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore keystorename.keystore .....\platforms\android\build\outputs\apk\android-release-unsigned.apk aliasname

it's work for me !!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!