Read the Meteor docs for the latest guide
- Meteor 1.6.1
- JDK 9.0.4
- Android Studio 3.0.1
- Android SDK Tools
- Cordova 7.x (Bundled with Meteor)
- Supports up to Android API Level 25 (Android 7.1.1)
- Requires Java Development Kit (JDK) 8 or later.
- Optional read: Cordova's Android Platform Guide
- Move the downloaded file to an installation directory like /opt
sudo mv jdk-9.0.4_linux-x64_bin.tar.gz /opt
- Unpack the tarball
sudo tar zxvf jdk-9.0.4_linux-x64_bin.tar.gz
- Remove the tarball
sudo rm -rf jdk-9.0.4_linux-x64_bin.tar.gz
Or see the Oracle Linux install Guide
- Installation prerequisites
sudo apt-get update
sudo apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
- Move the downloaded file to an installation directory like /opt
sudo mv android-studio-ide-171.4443003-linux.zip /opt
- Unpack the tarball
sudo unzip android-studio-ide-171.4443003-linux.zip
- Run installation script
/opt/android-studio/bin/studio.sh
- Remove the tarball (to save disk space)
sudo rm -rf android-studio-ide-171.4443003-linux.zip
-- OR --
- Download (bottom of the page)
- Install with the sdkmanager
-- OR --
See Android SDK Docs
ANDROID_SDK_ROOT
= Android SDK directoryANDROID_HOME
which also use to point to the Android SDK directory, is deprecated.STUDIO_JDK
= JDK directoryREPO_OS_OVERRIDE
= 'linux'- Add environment variables to ~/.bashrc (example)
- Add line to file
export HTTP_PROXY=myserver:1981
- Reload file
source ~/.bashrc
- For WebStorm terminal, rather use .bashrc than .profile (loaded on ui login) or .bash_profile (loaded on non ui login)
- Add line to file
.bashrc (example)
# Android
#export ANDROID_HOME="/opt/android-sdk" # ANDROID_HOME is deprecated
#export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
export ANDROID_SDK_ROOT="/opt/android-sdk"
export PATH="$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH"
export STUDIO_JDK="/opt/jdk-9.0.4"
export REPO_OS_OVERRIDE="linux"
# Gradle
export GRADLE_HOME="/opt/android-studio/gradle/gradle-4.1"
export PATH="$GRADLE_HOME/bin:$PATH"
# MongoDB
export MONGODB_HOME="/opt/mongodb"
export PATH="$MONGODB_HOME/bin:$PATH"
-
// TODO Research why
export JAVA_HOME="/opt/jdk-9.0.4"
might also be required -
Test your enviroment variables from the terminal you normally run meteor apps (IDE or OS)
$PATH
At this point, navigate back to your project directory and try running
meteor run android
to check for errors.
// this.Docs TODO
// - make android & sdkmanager executable ?
// - ad to PATH
- Install Gradle
apt-get ... //probably
- Add to ~/.bashrc
# Gradle
export GRADLE_HOME="/opt/android-studio/gradle/gradle-4.1"
export PATH="$GRADLE_HOME/bin:$PATH"
/usr/local/Cellar/gradle/3.4
- adb
apt-get install android-tools-adb
sudo usermod -aG plugdev $LOGNAME
adb devices
- Troubleshooting USB devices
Finally run meteor run android
and your are done!