1
votes

forgive me for my language . i installed cordova several times ago and it worked and created and released projects before .. i set up new windows this time i installed cordova using the same steps every time on the same windows version 10 i when i write the command:

cordova platform add android

it give me this error:

Failed to install 'cordova-plugin-whitelist':Error: cmd: Command failed with exit code 1 at ChildProcess.whenDone (C:\xampp\htdocs\test2\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) Error: cmd: Command failed with exit code 1 at ChildProcess.whenDone (C:\xampp\htdocs\test2\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

please any help.

1

1 Answers

0
votes

This is likely an error due to having an old JDK.

  1. Install the most recent JDK (Java SE Development Kit) for your system. If you are using 64-bit Windows I recommend getting the x64 JDK.
  2. Open advanced system settings
  3. Open the Environment Variables window
  4. Update the JAVA_HOME environment variable to point to the new JDK. e.g. "C:\Program Files\Java\jdk1.8.0_111"
  5. Open a new command window and try again.