Question

Okay, so I've set up cordova in my machine and everything works fine.

D:\PhoneGap\apps\hello>cordova -v
3.1.0-0.2.0

I'm able to create a new project using the create command. And I've got the structure that's needed (www folder et all). But when I run the following command :

cordova platform add android

I get the following error :

Downloading cordova library for android... [Error: Unable to fetch platform android: Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE ]

Looks like a node.js error to me. Some extra stuff you'd want to know :

  1. I'm using Windows 7
  2. I've set up the Android SDK PATH, JAVA path, APACHE ANT's PATH in Environment variables in system settings.
  3. I'm under an authenticated proxy but I've set up proxy settings for nodeJS.
  4. My .cordova folder (found in Users/myusername/) has an empty folder called android in the path .cordova/lib/
  5. I'm using cordova 3.

Do any of you guys know what could be the issue?

Was it helpful?

Solution

For people who stumble upon this at a later point of time, this can be fixed by setting strict-ssl option of npm as false.

 npm config set strict-ssl false 

But please note that this would lead to a lack of security for your machine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top