Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Mac instructions for mobile auto setup #117

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions procedures/mobile_automation_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ specific gradle versions and are in charge of installing it locally.
1. Install jdk8::

# On mac with homebrew
brew install --cask homebrew/cask-versions/adoptopenjdk8
brew install openjdk@8

# On Ubuntu
sudo apt install openjdk-8-jdk
Expand All @@ -248,17 +248,20 @@ specific gradle versions and are in charge of installing it locally.

2. Install android-sdk::

# On mac with homebrew
brew install --cask android-sdk

# On Ubuntu
sudo apt install android-sdk

On mac the only supported way is to install `Android Studio <https://developer.android.com/studio>`__ (also recommended for other OSs)
Once installed, click **More Actions** and open the **SDK Manager**.
Make note of the **Android SDK Location** from this screen.
From the **SDK Tools** tab, install ``Android SDK Command-line Tools``.


3. Make sure you're pointing to the right java (depending on what version gradle requires)::

# In your .zshrc or .bashrc:
# On mac
export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
export JAVA_HOME="$(java -XshowSettings:properties -version 2>&1 | grep java.home | sed 's/.* //')"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this works on Ubuntu too, maybe we should just list this as the defacto way to find JAVA_HOME?

# On Ubuntu follow symlinks to find JAVA_HOME
ls -l `which java`
Expand All @@ -274,7 +277,7 @@ specific gradle versions and are in charge of installing it locally.

# In your .zshrc or .bashrc:
# On mac
export ANDROID_SDK_ROOT=/usr/local/Caskroom/android-sdk/4333796
export ANDROID_SDK_ROOT=~/Library/Android/sdk

# On Ubuntu
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
Expand Down