Skip to content

Instantly share code, notes, and snippets.

@jlyon
Last active August 29, 2015 13:57
Show Gist options
  • Save jlyon/9475792 to your computer and use it in GitHub Desktop.
Save jlyon/9475792 to your computer and use it in GitHub Desktop.
phonegap, cordova, android, cli

Install

sudo npm install -g cordova
# Make sure that android sdk paths are in $PATH:
# export PATH=$PATH:/media/sda4/shared/android/adt-bundle-linux-x86_64-20131030/sdk/platform-tools:/media/sda4/shared/android/adt-bundle-linux-x86_64-20131030/sdk/tools

Create project

cordova add myapp
cd myapp
cordova platform add android
cordova -d run android --nobuild

Adding plugins (Filesystem)

cordova plugin add https://github.com/apache/cordova-plugin-file-transfer.git
cordova plugin add https://github.com/apache/cordova-plugin-file.git

Build, run in emulator (for debugging), emulate -> Look at http://jsconsole.com/remote-debugging.html, really helpful

cordova build -d 
adb install /media/sda4/shared/Downloads/myapp/platforms/android/ant-build/HelloCordova-debug.apk

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment