0

I am getting error as [Error: Failed to run "java -version", make sure that you have a JDK installed. You can get it from: http://www.oracle.com/technetwork/java/javase/downloads. ] ERROR building one of the platforms: Error: D:\testSFAndr\platforms\android\cordova\build.bat: Command failed with exit code 2 You may not have the required environment or OS to build this project Error: D:\testSFAndr\platforms\android\cordova\build.bat: Command failed with exit code 2 at ChildProcess.whenDone (C:\Users\rohit\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1008:16) at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

I have already set Java_Home system variable. Any kind of help is greatly appreciated.

1
  • did you ever find any solution? I too am facing the same problem
    – Sahil
    Apr 16, 2015 at 15:16

1 Answer 1

1

I had a JRE installed in my system. After installing JDK7, I am able to run "cordova build android" command

1
  • Well done for following up on this.
    – Rob
    May 28, 2015 at 9:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .