Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

StevenHu

macrumors member
Original poster
Sep 3, 2009
80
0
Southern CA
When I follow the steps for starting a new Cordova PhoneGap project for Eclipse (following these directions), I drag Android's /bin directory to the Terminal window first (which contains the create script), then type in:

./create /Users/Steve/Documents/PhoneGap_apps/PhoneGap_apps/appName2 com.companyname.appName2 appName2

... to create the project.

But what I get in return is:

-bash: /Users/Steve/Downloads/phonegap-phonegap-8a3aa47/lib/android/bin: is a directory

The appName2 directory is not created.

Why do I get that "is a directory" notice, and how do I resolve it to create the directory?
 

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
From the link you provided.

4. Setup New Project

In a terminal window, navigate to the bin directory within the android subfolder of the Cordova distribution.
Type in ./create <project_folder_path> <package_name> <project_name> then press "Enter"

You navigate to the bin directory with the cd command, so in Terminal :

type in cd then a space then drag Android's /bin directory to the Terminal window eg :

Code:
cd /Users/Steve/Downloads/phonegap-phonegap-8a3aa47/lib/android/bin

don't forget to enter after this and then run your command eg :

Code:
./create /Users/Steve/Documents/PhoneGap_apps/PhoneGap_apps/appName2 com.companyname.appName2 appName2

... to create the project.
 

StevenHu

macrumors member
Original poster
Sep 3, 2009
80
0
Southern CA
Wow! That's the answer! Thanks a lot! I thought dragging the folder over was the same thing as changing the directory.

Uh-oh. It created the directory all right, but the folder is empty. It should be filled with files to create the Android version of a PhoneGap app.
 
Last edited:

kryten2

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
Sorry I don't use Eclipse but I assume you've followed all the steps in the documentation? Did you install the Android SDK? Where did you install it? Can you run the following in Terminal and post the output ?

Code:
echo $PATH
 

StevenHu

macrumors member
Original poster
Sep 3, 2009
80
0
Southern CA
I had followed all the steps in the documentation and successfully created an app. But the steps are not working now!

Here's the result of echo $PATH:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/github:/opt/X11/bin:/Applications/android-sdk-mac_x86platform-tools:/Applications/android-sdk-mac_x86/platform-toolstools:/Applications/android-sdk-mac_x86/tools/Users/Steve/Downloads/phonegap-phonegap-8a3aa47/lib/android/bin
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.