为什么“离子科尔多瓦建立"?只生成未签名的 APK? [英] Why does "ionic cordova build" only generate unsigned APKs?

查看:26
本文介绍了为什么“离子科尔多瓦建立"?只生成未签名的 APK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的命令来生成一个签名的 APK,我很确定这在几个月前有效:

I use the below command in order to generate a signed APK, I'm pretty sure this worked a few months ago:

$ ionic cordova build android --prod --release --keystore="./my-keystore-file.keystore" --storePassword=mypass --alias=mymail@gmail.com --password=我的密码

但是,只会生成未签名的 APK.如何使用 ionic 生成签名的 APK?

However, only an unsigned APK is generated. How can I generate a signed APK using ionic?

推荐答案

您需要在 Cordova 特定参数之前包含 -- -- :

You need to include -- -- before the Cordova-specific arguments:

$ ionic cordova build android --prod --release -- -- --keystore="./my-keystore-file.keystore" --storePassword=mypass --alias=mymail@gmail.com --password=mypass

build android --prod --release 选项由 Ionic CLI 处理,而第一个 -- 之后的所有内容都传递给 Ionic Cordova 插件.然后将第二个 -- 之后的所有内容传递给 Cordova 本身.

The build android --prod --release options are handled by the Ionic CLI, whereas everything after the first -- is passed to the Ionic Cordova plugin. Then everything after the 2nd -- is passed to Cordova itself.

这篇关于为什么“离子科尔多瓦建立"?只生成未签名的 APK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆