...
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:
| Edit the ~/.bashrcbash_profile file:
| Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:
Replace username by the name of the user. |
JAVA_HOME | Edit the ~/.bashrc file:
If jbr is not present (old version Android Studio) replace by jre. | Edit the ~/.bash_profile file:
| Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:
If jbr is not present (old version Android Studio) replace by jre. |
PATH | Edit the ~/.bashrc file:
| Edit the ~/.bash_profile file:
| Windows start menu > Settings > System > About > Advanced settings > Environment variables > Path > Add:
|
...