构建离子项目的.apk文件时出错

时间:2017-11-13 11:01:16

标签: android cordova ionic-framework

pampa@Pampa:~/Desktop/DemoApp$ ionic cordova platform add android
Platform android created
pampa@Pampa:~/Desktop/DemoApp$ cd platforms/android
pampa@Pampa:~/Desktop/DemoApp/platforms/android$ ionic android --release

[ERROR] Unable to find command: android

1 个答案:

答案 0 :(得分:0)

您使用的是Ionic CLI的哪个版本?

从版本3.0.0开始,如果要构建cordova,则应在cmd中添加关键字cordova platform,例如

 ionic cordova android --prod --release

参考:https://github.com/ionic-team/ionic-cli/blob/master/CHANGELOG.md