Build.phonegap上传或转换p12证书文件 [英] Build.phonegap upload or convert a p12 certificate file
问题描述
我有一个带DevExtreme工具的phonegap项目. 它与phonegap cli-7.1.0一起使用,并且可以正常工作.
I have my phonegap project with DevExtreme tool. It is with phonegap cli-7.1.0 and it works fine.
现在我想升级到cli-9.0.0.
Now I'd like to upgrade to cli-9.0.0.
我使用 https://build.phonegap.com 构建项目 通常,我在这里构建ipa文件,并使用apk作为模板来编译要使用DevExtreme工具发布的apk.
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.
我创建了一个模板apk,但是当我尝试在DevExtreme中使用它时,出现错误错误构建android程序包索引超出范围.必须为非负数,并且小于集合参数名称:index的大小"
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".
因此,我尝试直接使用 https://build.phonegap.com 编译apk 为此,我需要导入与商店中发布应用程序相同的证书(对吗?).我的证书是p12文件.
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.
我尝试上传p12文件,但收到消息错误:扩展名.p12与预期的(密钥库)不匹配".好的,所以我用谷歌搜索了密钥库"中的p12.我找到以下命令行:
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
这创建了一个jks文件,但是当我尝试将其上传到build.phonegap时,我收到类似的消息:错误:扩展名.p12与预期的(jks)不匹配."
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)".
那么,如何将我的p12证书转换为build.phonegap接受的文件,并使用它来创建我的apk文件并发布它?
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??)
推荐答案
似乎我找到了解决方案.使用此命令转换我的p12文件有效:
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
这篇关于Build.phonegap上传或转换p12证书文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!