Skip to content

Instantly share code, notes, and snippets.

@sscotth
Created May 3, 2015 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sscotth/d50ba2f3852dbe9941b9 to your computer and use it in GitHub Desktop.
Save sscotth/d50ba2f3852dbe9941b9 to your computer and use it in GitHub Desktop.

Android Deployment Instructions for Mac OS X

Deployment on Android device

  • Run: "sudo npm install -g cordova"
  • Run: "sudo npm install -g ionic"
  • Run: "brew install android-sdk"
  • Run: “android” then install the following packages
    • Tools: Andoird SDK Tools, Android SDK Platform-tools, Android SDK Build-tools
    • Android 4.4.2 (API 19)
    • Extras: Android Support Library
  • Run: "ionic platform android"
  • Run: "brew install ant"
  • Run: "ionic build android”
  • Plug in Android device
  • Run: “adb devices -l” to verify device detected
  • Run: "ionic run android"
  • Debugging:
  • ensure the following line is added to the file platforms/android/AndroidManifest.xml to allow location services:
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  • if running into issues with plug-ins not being recognized run the following commands:
    cordova platform rm android
    cordova platform add android

Deployment on Android emulator using Genymotion

  • Register for Genymotion account
  • Install Genymotion software
  • Run: "sudo npm install -g cordova"
  • Run: "sudo npm install -g ionic"
  • Run: "brew install android-sdk"
  • Run: “android” then install the following packages
    • Tools: Andoird SDK Tools, Android SDK Platform-tools, Android SDK Build-tools
    • Android 4.4.2 (API 19)
    • Extras: Android Support Library
  • Run: "ionic platform android"
  • Run: "brew install ant"
  • Run: "ionic build android”
  • Launch Genymotion
  • Create Android virtual device profile
  • LaunchAndroid virtual device
  • Run: “adb devices -l” to verify virtual device detected
  • Run: "ionic run android"
  • Debugging:
  • ensure to turn on GPS and set current location within bounds of the app
  • can also inspect with chrome://inspect/#devices to get console notifications

Debug on Android phone using Chrome

  • plug in android phone with data cable
  • go to: chrome://inspect/#devices
  • your device will show up, click "inspect"
  • now you can debug the app in your phone
  • you can even change the CSS in the DevTools and it will update on your phone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment