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
share|improve this question
    
Try using cordova -d run <platform> for a verbose output when running. – Guillem Vicens May 14 '15 at 6:17

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.