For Mac OS users -> https://guide.meteor.com/mobile.html#installing-prerequisites
For ubuntu users, these steps bellow worked for me:
Java JDK 8
sudo add-apt-repository ppa:webupd8team/java
sudo apt update; sudo apt install oracle-java8-installer
sudo apt install oracle-java8-set-default
KVM
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils virt-manager
sudo adduser `id -un` libvirtd
you may need to logoff and login again for this to take effect
android studio
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
sudo add-apt-repository ppa:lyzardking/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake android
~/.local/share/umake/android/android-studio/bin/studio.sh
advanced options, install Android virtual device (check all boxes)
choose custom path : ~/Android/Sdk
follow the instructions
when Android Studio is launched, click configure, SDK Manager
find and install Android SDK 25 (SDK + sources) and select all you can in the SDK tools tab (especially the emulator)
if not using zsh, replace .zshrc with .bashrc
echo "# Android SDK Path" >> ~/.zshrc
echo "export ANDROID_HOME=$HOME/Android/Sdk" >> ~/.zshrc
echo "export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools" >> ~/.zshrc
echo "alias emulator=$ANDROID_HOME/emulator/emulator" >> ~/.zshrc
source ~/.zshrc
download and extract https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
move it to ~/Android/Sdk/tools-25.2.3
On their website, Meteor tell that if you encounter problems with the android tools, you should use the 25.2.3, so change back the PATH value to this:
echo "export PATH=$PATH:$ANDROID_HOME/tools-25.2.3:$ANDROID_HOME/platform-tools" >> ~/.zshrc
gradle
sudo apt-get install gradle
meteor
inside the meteor project repository
curl https://install.meteor.com/ | sh
meteor add-platform android
meteor run android
Optionnal:
fix "WARNING: Attempting to install plugin cordova-plugin-statusbar@2.2.1"
inside the meteor project repository
echo "cordova-plugin-statusbar@2.2.3" >> "$(pwd)/.meteor/cordova-plugins"
echo "cordova-plugin-splashscreen@4.0.3" >> "$(pwd)/.meteor/cordova-plugins"
fix error "Cannot read property 'replace' of undefined"
find .meteor/local/cordova-build/platforms/android/cordova/lib/emulator.js
replace line 202 with
var num = target.match(/\d+/)[0];
fix android emulator device freeze or change your avd
After listing your avd, delete it and recreate it
~/Android/Sdk/tools/bin/avdmanager list avd
~/Android/Sdk/tools/bin/avdmanager delete avd -n Nexus_5X_API_27_x86
~/Android/Sdk/tools/bin/avdmanager create avd -n Nexus_5X_API_27_x86 -d 9 -k 'system-images;android-27;google_apis;x86'
Meteor seems to work better if only one avd is present.