Skip to content

Instantly share code, notes, and snippets.

@cedced19
Last active May 22, 2017 18:59
Show Gist options
  • Save cedced19/ee6ba04e4eaf8e558946 to your computer and use it in GitHub Desktop.
Save cedced19/ee6ba04e4eaf8e558946 to your computer and use it in GitHub Desktop.
A list of usefull command to use with Apache Cordova.

Apache Cordova

Installation

Usefull links:

Download SDK from Google SDK download page

$ sudo dnf install ant glibc glibc-devel libstdc++ zlib-devel ncurses-devel libX11-devel libXrender libXrandr mesa-libGL-devel
$ sudo tar xf android-sdk-linux.tgz -C /usr/local/share
$ sudo chmod -R 777 /usr/local/share/android-sdk-linux

Edit ~/.bashrc and add this line:

export PATH=$PATH:/usr/local/share/android-sdk-linux/tools:/usr/local/share/android-sdk-linux/platform-tools

Finaly just execute:

$ android

Cordova

$ npm install cordova ripple -g

Commands

Add platform

$ cordova platform add android 

Add plugin

$ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git

Build

$ cordova build android

Emulate in browser

$ ripple emulate --path ./

Emulate in device

$ cordova run android

Emulate in emulated device

$ cordova emulate android

Adb wireless

  1. Connect the device via USB and make sure debugging is working.
  2. adb tcpip 5555
  3. Find IP with Connect the device via USB and make sure debugging is working.
  4. adb connect 192.168.0.8:5555
  5. Disconnect USB and proceed with wireless debugging.
  6. adb -s 192.168.0.8:5555 usb to switch back when done.

React native

Accept license:

android update sdk --no-ui --filter build-tools-24.0.0,android-24,extra-android-m2repository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment