license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
This guide describes how to set up your development environment for Cordova and run a sample application.
Android 1.x is currently not supported. In general, superseded platforms are deprecated as they dip below 5% on Google's distribution dashboard.
Download and install Android SDK
Download and extract the latest copy of Cordova. You will be working in the android directory.
Applications/Utilities folder.touch ~/.bash_profile; open ~/.bash_profile
platform-tools and tools directory. This example uses /Development/android-sdk-macosx as the SDK's install directory. Add the following line:export PATH=${PATH}:/Development/android-sdk-macosx/platform-tools:/Development/android-sdk-macosx/tools
.bash_profile to update your PATH.source ~/.bash_profile
C:\Development\android-sdk-windows as the SDK's install directory. Append the following into the text box:;C:\Development\android-sdk-windows\platform-tools;C:\Development\android-sdk-windows\tools
%JAVA_HOME%\bin to your PATH. To check if this is required, open a command prompt and type java. Add %JAVA_HOME%\bin to the PATH if the program can't be found. You may need to specify the full path instead of the %JAVA_HOME% environment variable.%ANT_HOME%\bin to your PATH. To check if this is required, open a command prompt and type ant. Add %ANT_HOME%\bin to the PATH if the program can't be found. You may need to specify the full path instead of the %ANT_HOME% environment variable.In a terminal window, navigate to the Cordova distribution android/bin directory.
Type ./create <project_folder_path> <package_name> <project_name>, then press Enter
<project_folder_path> is the path to your new Cordova Android project <package_name> is the package name, e.g. com.YourCompany.YourAppName <project_name> is the project name, e.g. YourApp (Must not contain spaces and dashes)
If you get an An unexpected error occurred error, try the command again prefixed with sudo
Launch Eclipse, and select menu item New Project:
Select the directory you used for <project_folder_path>
Click Finish.
If your project has a red X indicating there is a problem follow these additional steps:
NOTE: For a faster experience, use an Intel-based emulator image.
Intel x86 Atom System Images as well as the Intel Hardware Accelerated Execution Manager (under Extras).extras/intel/Hardware_Accelerated_Execution_Manager within your Android SDK