Versions Compared

Key

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

...

The default path for the SDK depends of the OS :

In For windows : ANDROID_HOME = c:\USERS\USER\AppData\Local\Android\Sdk (replace USER by your user profile)

In For linux : ANDROID_HOME = $home\Android\Sdk

...

To use uiautomatorviewer, open a terminal and go to the path in the SDK android :

For windows

Code Block
cd %ANDROID_HOME%\tools\bin
uiautomatorviewer.bat

For linux

Code Block
cd $ANDROID_HOME/tools/bin

...


./uiautomatorviewer

windows : uiautomatorviewer.batif ANDROID_HOME variable is not set, referer to the table

If you have en error, this is probably because uiautomatorviewer should is configured to use by default java JDK version 1.8

...

set environment variables for your PC profile

...

Default path for windows

Default path for Linux

ANDROID_HOME

add this variable to precise the path on the sdk android

c:\Users\USER\AppData\Local\Android\Sdk

$home\android\sdk

JAVA_HOME

...

add this variable to set the path to the JDK. you can use the

...

modify the variable path to add java directory %JAVA_HOME\bin

...

jdk installed by android studio

c:\Program Files\Android\Android Studio\jbr

if jbr is not present (old version Android Studio, replace by jre)

$home\android-studio\jbr

if jbr is not present (old version Android Studio, replace by jre)

PATH

Complete the path by adding the path to directory containing the java executable.
Do not replace PATH value, only add new entry

%JAVA_HOME%\bin

$JAVA_HOME\bin

...

Pour lancer uiautomatorviewer, ouvrir un terminal de commande et aller dans le répertoire $ANDROID_HOME/tools/bin et taper le nom de l'éxécutable présent dans le répertoire (uiautomatorviewer ou uiautomatorviewer.bat en fonction de votre OS …)

...