Jason Bourne
Jason Bourne

Reputation: 786

Apache cordova issue in Netbeans 7.4

I just downloaded Netbeans 7.4 and I am trying to explore Apache Cordova. When I try to create a new project, I get always BUILD FAILED problem.

Here is the log

ant -f /Users/jason/NetBeansProjects/HTML5Application/nbproject "-Dupdate.task.jar=/Applications/NetBeans/NetBeans 7.4.app/Contents/Resources/NetBeans/webcommon/ant/extra/org-netbeans-modules-cordova-projectupdate.jar" "-Dios.provisioning.profile=/Users/jason/Library/MobileDevice/Provisioning Profiles/6B14AF63-D435-47F0-AF54-F24E2066EEBA.mobileprovision" -Dandroid.project.activity=HTML5Application "-Dios.certificate.name=iPhone Developer" -Denv.DISPLAY=:0.0 -Dsite.root=www_nb_temp "-Dcordova.version=3.1.0-0.2.0
"upgrade-to-cordova-project
check-cordova-project:
check-cordova-version:
upgrade-to-cordova-project:
cordova -d create . com.coolappz.HTML5Application HTML5Application
Error: Path already exists and is not empty: /Users/jason/NetBeansProjects/HTML5ApplicationCreating a new cordova project with name "HTML5Application" and id "com.coolappz.HTML5Application" at location  "/Users/jason/NetBeansProjects/HTML5Application"

at CLI.create (/usr/local/lib/node_modules/cordova/src/create.js:63:25)
at new CLI (/usr/local/lib/node_modules/cordova/src/cli.js:105:30)
at Object.<anonymous> (/usr/local/lib/node_modules/cordova/bin/cordova:41:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
/Users/jason/NetBeansProjects/HTML5Application/nbproject/build.xml:78: exec returned: 1
BUILD FAILED (total time: 1 second)

I have already node.js installed (version v0.10.20) and Apache Cordova (3.1.0-0.2.0)

What is the solution? It is a bug ?

Upvotes: 3

Views: 1882

Answers (2)

Jason Bourne
Jason Bourne

Reputation: 786

Actually I got the problem is not a Netbeans bug, it is an Apache Cordova bug at the version 3.1.0-0.2.0 (Latest until now).

The solution is to downgrade from the version 3.1.0-0.2.0 to 3.1.0-0.1.0 and everything will work fine:

sudo npm uninstall -g cordova
sudo npm install -g [email protected]

Thank you @Geertjan & @Cocorico for your help

Upvotes: 7

Cocorico
Cocorico

Reputation: 2018

Maybe try to name your app to see what appens :

cordova -d create "HTML5Application" com.coolappz.HTML5Application HTML5Application

Also, check all environment variables (ant,java,...) even if it seems to be good :

java --version
...

Try to change the folder name and app name and come back here to tell what happened.

Upvotes: 0

Related Questions