简体   繁体   中英

Error to build .apk file of an ionic project

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

Which version of Ionic CLI are you using?

Since version 3.0.0 you should add the keyword cordova in your cmd if you want to build the cordova platform , like

 ionic cordova android --prod --release

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM