Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble with getting started on PhoneGap: Apache Cordova error

I've been following the PhoneGap Getting Started Guide for Android. I'm on the step where it says: Type in ./create <project_folder_path> <package_name> <project_name> then press "Enter"

However, whenever I do this command in the form of ./create ./test2 com.mytest MyTest I get this error: An error occurred. Deleting project...

I'm in the right directory, and I don't believe I've done anything out of the ordinary in following their steps.

PS I'm on Mac OS X 10.7.5

Update: I tried installing the phonegap-master zip directly as one of the answers suggested. Now I get a new error when I run the command in that android bin directory: An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1

like image 944
bgcode Avatar asked Jan 07 '13 01:01

bgcode


People also ask

Is Cordova still supported?

Supported platforms As of version 9, Apache Cordova currently supports development for the operating systems Apple iOS, Google Android, Windows 8.1, Windows Phone 8.1 , Windows 10 and Electron (software framework) (which in turn runs on Windows, Linux and macOS).

Is Cordova going away?

Starting April 1, 2022, the App Center service will no longer accept calls from the Cordova SDK. While the services may continue to work for a short period of time afterward, we do not guarantee interaction of services or availability in the App Center portal.


2 Answers

Try

./create ./test2/MyTest com.mytest MyTest

the project_folder_path should be a non-exist folder

like image 114
Semicircle Avatar answered Oct 04 '22 13:10

Semicircle


My problem is the incorrect paths to Android SDK. If you follow the instructions straight up, it will tell you to add

export PATH=${PATH}:/Development/android-sdk-macosx/platform-tools:/Development/android-sdk-macosx/tools

to .bash_profile or .profile. I had to change mine to

export PATH=/Users/my_username/Development/android-sdk-macosx/platform-tools:/Users/my_username/Development/android-sdk-macosx/tools:$PATH
like image 40
voratima Avatar answered Oct 04 '22 15:10

voratima