Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Install Android Studio if you don’t have it

  • Open Android Studio

  • Click on More Actions > SDK Manager (or Tools > SDK Manager if a project is open)

  • Click on the SDK tools tab, uncheck option "Hide Obsolete Packages"

  • Check option “Android SDK Tools” and install version 26.1.1

  • UIautomatorviewer UIAutomatorViewer is now installed in Android SDK directory

  • Add UIAutomatorViewer to your path:

    • On Linux: add the line export PATH=$HOME/Android/Sdk/tools/bin:$PATH in the .bashrc file and run the command "source ~/.bashrc"

    • On Mac: add the line export PATH=$HOME/Library/Android/sdk/tools/bin:$PATH in the .bash_profile file and run the command "source ~/.bash_profile"

...

    • On Windows: Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Modify > Add the path C:\Users\[username]\AppData\Local\Android\Sdk\tools\bin. Replace username by the name of the user.

Note

UIAutomatorViewer needs a JDK 1.8 by default to work

...

Linux

Mac

Windows

ANDROID_HOME

Edit the ~/.bashrc file:

export ANDROID_HOME=$HOME/Android/Sdk

Edit the ~/.bashrcbash_profile file:

export ANDROID_HOME=$HOME/Library/Android/sdk

Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:

C:\Users\[username]\AppData\Local\Android\Sdk

Replace username by the name of the user.

JAVA_HOME

Edit the ~/.bashrc file:

export JAVA_HOME=$HOME/android-studio/jbr

If jbr is not present (old version Android Studio) replace by jre.

Edit the ~/.bash_profile file:

export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"

Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:

C:\Program Files\Android\Android Studio\jbr

If jbr is not present (old version Android Studio) replace by jre.

PATH

Edit the ~/.bashrc file:

export PATH=$JAVA_HOME/bin:$PATH

Edit the ~/.bash_profile file:

export PATH=$JAVA_HOME/bin:$PATH

Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:

$JAVA_HOME\bin

...