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
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).
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.
Try
./create ./test2/MyTest com.mytest MyTest
the project_folder_path should be a non-exist folder
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With