Tuesday, 4 February 2014

Cordova issues - adding platforms to a project on Windows 7

Just thought I'd share a particular issue I had using Cordova on Windows 7 (specifically version 3.3.1-0.1.2). For now, let's just quickly skip over the question of why I'm doing cross platform development on Windows when I have a Mac available.

I followed these instructions for getting started (outdated, but still relevant) I since found the latest documentation here. I then created a sample project.

Then it was time to turn my generic hello world project into an Android project...I executed the cordova platform add command (from my project's root directory, per the instructions) specifying android as the target. The internet can be a harsh and cynical place, so here's a cut and paste from the command window, just to prove this actually happened:

c:\projects\Beacon>cordova platform add android
Creating android project...

I tried this a few times with no success, it seemed I had a hanging process on my hands. I thought, hmm...maybe this does just take a while, so I left it running over the weekend...still no output.

I've worked through the installation process again and verified that Eclipse, Java, node.js & Cordova are all installed properly, and all of my environment variables seem to be configured correctly.

I had a quick dig around to see if there's a log file produced by Node.js that could point me in the right direction, but no luck there.

Updating to the latest version of Cordova, which at time of writing was 3.3.1-0.3.1, did not help.

I think the next step is to see if I can get under the hood of Node.js and see what's causing the apparent hang...or I could just move to the Mac, but where's the fun in that. ;-)
Post a Comment