我已经在Ubuntu 14.04中的Cordova中成功构建了适用于Android的应用程序。但是,在尝试在项目文件夹中运行Cordova build Ubuntu时出现错误,如下所示,
Running command: /home/sachin/myapp/platforms/ubuntu/cordova/build
Building Desktop Application...
Missing icon
ERROR building one of the platforms: Error: /home/sachin/myapp/platforms/ubuntu/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /home/sachin/myapp/platforms/ubuntu/cordova/build: Command failed with exit code 1
at ChildProcess.whenDone (/usr/share/cordova-cli/_vendor/cordova-lib/5.3.1/src/cordova/superspawn.js:139:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
如何解决这些错误?
安装Cordova:
sudo add-apt-repository ppa:cordova-ubuntu/ppa
sudo apt-get update
sudo apt-get install cordova-cli
创建一个项目:
cordova create project1 REVERSEDNSNAME.project1 project1
cd project1
将Ubuntu添加到平台:
cordova platform add ubuntu
cordova build ubuntu
cordova run ubuntu
参考这里
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句