- Java, and set JAVA_HOME environment variable
- Gradle https://gradle.org/install/
- Android studio OR android sdk-build-tools
Run sudo find / -type d -name 'android'
and find
*/Android/Sdk/*
. We will export it to our PATH in our current shell.
Follow
https://stackoverflow.com/questions/23042638/how-do-i-set-android-sdk-home-environment-variable
export ANDROID_HOME=$HOME/<THAT_PATH_YOU_KNOW>/Android/sdk
# Nope?
# avdmanager, sdkmanager
# export PATH=$PATH:$ANDROID_HOME/tools/bin
# adb, logcat
# export PATH=$PATH:$ANDROID_HOME/platform-tools
# emulator
# export PATH=$PATH:$ANDROID_HOME/emulator
# apksigner, zipalign
# export PATH=$PATH:$ANDROID_HOME/build-tools
Before you continue make sure everything is set up correctly by testing:
echo $JAVA_HOME
echo $ANDROID_HOME
gradle -v
android
adb
! For windows check OEM for you specific device
To run on local android device
adb tcpip 5555
adb connect device_ip_address
npm install ## Don't forget to install dependencies!!
ionic cordova run android ## Add '-l' for live reload (It's veeery niice)
If it's not working checkout
https://ionicframework.com/docs/installation/android
https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html
Further to debug with chrome tools open chrome://inspect/#devices
Make sure your device is connected, read more at https://ionic.zone/debug/remote-debug-your-app#android
Make sure your device is running the same chrome version as your environment https://www.google.com/linuxrepositories/
Find Ionic App <device_ip>:<port> inspect
and hit inspect
To emulate ionic cordova emulate [<platform>] [options]
(https://ionicframework.com/docs/cli/commands/cordova-emulate)
Check virtuals devices w/ android list avd