Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build app for ubuntu in cordova?

Tags:

ubuntu

cordova

I've successfully built app for android in cordova in ubuntu 14.04. However, I got error while I was trying to run cordova build ubuntu in project folder, which is as following:

ERROR building one of the platforms: Error: /home/ninger/cordova/vfinder/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/ninger/cordova/vfinder/platforms/ubuntu/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131: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)

After run cordova -d run ubuntu, I got the verbose output as following, almost the same hints:

missing icon element in config.xml
Generating config.xml from defaults for platform "ubuntu"
Calling plugman.prepare for platform "ubuntu"
Preparing ubuntu project
Processing configuration changes for plugins.
Iterating over installed plugins: [ 'cordova-plugin-whitelist' ]
Writing out cordova_plugins.js...
missing icon element in config.xml
Running command:/home/ninger/cordova/test/platforms/ubuntu/cordova/run 
Building Desktop Application...
Missing icon
Command finished with error code 1:/home/ninger/cordova/test/platforms/ubuntu/cordova/run 
ERROR running one or more of the platforms: Error: /home/ninger/cordova/test/platforms/ubuntu/cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project
like image 856
NingerJohn Avatar asked Apr 02 '26 02:04

NingerJohn


1 Answers

I faced the same problem, and after finding on the internet different solutions that didn't work. I did a little of research in the git repository https://github.com/apache/cordova-ubuntu apparently the bug has been solved during the summer but the last release is from last december. So for solving it just add the platform directly from the repository like this

cordova platform add https://github.com/apache/cordova-ubuntu

Hopefully this will solve your problem.

like image 126
Javier Abrego Avatar answered Apr 08 '26 13:04

Javier Abrego



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!