Samy Omar
Samy Omar

Reputation: 810

failed to run phonegap 3.0 cli android app (No such file or directory)

I am trying to build my first phonegap app using version 3.0

I followed theses steps:

  1. I installed NodeJS successfully on my mac os
  2. on the shell --> $ sudo npm install -g phonegap
  3. then I tried build the app but I got this exception

Here is the code sample

$ phonegap create my-app  
$ cd my-app 
$ phonegap run android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
[error] An error occured during creation of android sub-project. /bin/sh: /Users/mac/.cordova/lib/android/cordova/3.0.0/bin/create: No such file or directory

I found that the directory /Users/mac/.cordova/lib/android/cordova/3.0.0 is empty

Phonegap version is

phonegap --version
3.0.0-0.14.0

Any suggestions ?

Upvotes: 2

Views: 2574

Answers (1)

Jim Jeffries
Jim Jeffries

Reputation: 10081

I ran into the same problem. I fixed it by downloading the missing files (the whole of the bin directory) as a zip from the cordova-android project on github and extracting them to the empty /Users/mac/.cordova/lib/android/cordova/3.0.0 directory.

I also found I had to run it the command as sudo.

Upvotes: 5

Related Questions