问题
I have my phonegap project with DevExtreme tool. It is with phonegap cli-7.1.0 and it works fine.
Now I'd like to upgrade to cli-9.0.0.
I build the project with https://build.phonegap.com Usually, I build ipa file here and I use the apk as template to compile the apk to publish with DevExtreme tool.
I created a template apk but when I try to use it in DevExtreme, I got error"error build android package Index was out of range. Must be non-negative and less than the size of the collection parameter name:index".
So, I'm trying to compile the apk directly with https://build.phonegap.com To do this, I need to import the same certificate I'm already using to publish the app in the store (right?). My certificate is a p12 file.
I try to upload the p12 file, but I get the message "Error: extension .p12 did not match expected (keystore)". Ok, so I googled to convert the p12 in "keystore". I found this command line:
keytool -importkeystore -srckeystore android_certificate.p12 -srcstoretype pkcs12 -destkeystore C:\Program Files\Java\jre1.8.0_211\bin\xxx.jks -deststoretype jks -deststorepass xxx
This created a jks file, but when I try to upload it to build.phonegap I get a similar message: "Error: extension .p12 did not match expected (jks)".
So, how can I convert my p12 certificate to something accepted by build.phonegap and use it to create my apk file and publish it?
My problem is the app is already published, so I have to use the same certificate and not a new one (right??)
回答1:
It seems I found a solution. Converting my p12 file with this command works:
keytool -v -importkeystore -srckeystore android_certificate.p12 -srcstoretype PKCS12 -destkeystore myKey.keystore -deststoretype JKS
Thanks to this question
来源:https://stackoverflow.com/questions/57439739/build-phonegap-upload-or-convert-a-p12-certificate-file