sudo apt-get install git
sudo apt-get install node
bla bla
sudo npm install -g phonegap
sudo apt-get install ant
Download from : http://developer.android.com/sdk/index.html Extract to /usr/local/android-sdk-linux sudo tar -xvf android-sdk_r24.0.2-linux.tgz -C /usr/local/
why ??? /usr/local/
sudo apt-get install openjdk-7-jre
sudo apt-get install openjdk-7-jdk
sudo /usr/local/android-sdk-linux/tools/android
Open the Tools directory and select: Android SDK Tools Android SDK Platform-tools Android SDK Build-tools (highest version)
Open the first Android X.X folder (the latest version) and select: SDK Platform A system image for the emulator, such as ARM EABI v7a System Image
Note the API version.
Install the packages.
Open .profile for editing using the following command. gedit ~/.profile
Append the following lines to the end of the file. Do not put these inside any of the IF blocks. export ANDROIDHOME=/usr/local/android-sdk-linux/ export PATH=$PATH:$ANDROIDHOME/tools:$ANDROID_HOME/platforms-tools
Save the file, log out, and log back in to apply the changes.
https://cordova.apache.org/ sudo npm install -g cordova
sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1
Go to the directory where you maintain your source code, and run a command such as the following: cordova create hello com.example.hello HelloWorld
Add Platforms cd hello
$ cordova platform add ios
$ cordova platform add amazon-fireos
$ cordova platform add android
$ cordova platform add blackberry10
$ cordova platform add firefoxos
Run this to check your current set of platforms: $ cordova platforms ls
Go to project folder -> platforms -> android -> AndroidManifest.xml
Find something like:
Replace the value of android:targetSdkVersion by the version
Edit config.xml http://cordova.apache.org/docs/en/4.0.0/configrefindex.md.html#The%20config.xml%20File
Configuring Icons in the CLI
The following configuration can be used to define single default icon which will be used for all platforms:
Add your index.html, js images and css files to the relevant folders in the www folder
$ cordova build
The result will be a file called yourApp-debug-unaligned.apk in the directory /path/to/app/files/platforms/android/ant-build
Inspired by: - http://www.levibotelho.com/development/the-complete-guide-to-running-phonegap-on-ubuntu/ - https://steveyoung.wordpress.com/2014/10/22/updating-phonegap-app-to-cordova-3-5-1/