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.

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

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

  • Well done for following up on this. – Rob May 28 '15 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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