Apache Cordova has very nice documentation, however as so many projects it is focused on the Windows/MacOS duopolies only. Fortunately it’s not too hard to work out the differences.
sudo apt-get install python-software-properties python g++ make ant openjdk-7-jre openjdk-7-jdk
Installing Android SDK
Please note: one of the problems I found was that I had some Android tools from the Ubuntu repos that were conflicting with the SDK install. It’s probably a good idea to remove them first. That might save you from a lot of headaches down the line (and time to troubleshoot).
sudo apt-get remove android-tools-adb android-tools-fastboot
Download as per http://developer.android.com/sdk/index.html
Note: check for updated link version obviously
Add the PATH variables to the top of the file
Reload bash variables without reboot / logout
This command should now bring up the SDK manager.
Installing Eclipse IDE
This is obviously an optional step depending on the IDE you want to use. I have previously covered a manual Eclipse install (as opposed to the Ubuntu repositories).
Install Eclipse ADT Plugin
As per: http://developer.android.com/sdk/installing/installing-adt.html
The main difficulty on Ubuntu (as with so many development tools – see Eclipse above) is that the included node.js version in the Ubuntu repositories is outdated (remove the Ubuntu version with ‘sudo apt-get remove node’).
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs
sudo npm install -g cordova
Check Cordova Requirements
This will check for Android SDK installation, Ant and other dependencies – saving you going through error messages later.
Create Cordova Project
cordova create ~/projects/PROJECTNAME com.COMPANYNAME.PROJECTNAME PROJECTNAME
cordova -d platform add android
Create Eclipse Project
Create New Android project from existing sources
Test in emulator by right clicking the project and selecting “Run As –> Android App”