2
votes

I'm new to Cordova and just started playing with it. I'm hoping someone has an idea or point me in the right direction.

I'm getting the following error when performing the following commands:

(1) cordova create HelloWorld com.example.hello "HelloWorld" -- Works
(2) cd HelloWorld
(3) cordova platform add android - Fail

C:\development\workspace\mobile\HelloWorld>cordova platform add android [Error: An error occured during creation of android sub-project. Creating Cordova project for the Android platform:]

Now I did searches and most of what I found was this error would occur if there was a space like "Hello World" in the create command. As you can see I don't have a space.

Is it an issue with the Cordova version? Not sure.

Thanks for any help.

1

1 Answers

0
votes

I got the same error and here is what I did,

  1. Add your JDK path to the java_home.
  2. I have also added path of my JDK to the path environmental variable.
  3. restarted my system and followed the same steps, it worked for me.

Thanks.