Status | ||||
---|---|---|---|---|
|
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Android Studio provides several tools needed in Greenspector Studio, as:
...
Select
More actions
andSDK Manager
Choose
SDK Tools
and uncheckHide Obsolete Packages
Search for
Android SDK Tools (Obsolete) 26.1.1
and confirm installation
...
Environment variables
Android Studio is now installed on computer. However, it’s not known by OS as environment variables: tools are launchable only in their installation folder, which isn’t practical for Greenspector Studio uses.
...
Check for presence of
aapt
in folderbuild-tools/3435.0.0
Check for presence of
adb
in folderplatform-tools
Check for presence of
uiautomatorviewer
in foldertools/bin
...
Code Block |
---|
%ANDROID_HOME%\build-tools\3435.0.0 %ANDROID_HOME%\platform-tools %JAVA_HOME%\bin |
...
You should see the following result:
...
UIAutomatorViewer
We didn’t had directly path to UiAutomatorViewer
. Indeed, this tools need a precise Java version to run. To avoid this extra installation, we will link it to integrated java installation of Android Studio via a command.
Method 1 : Get prepared file
In this method, simply get the prepared .bat file to run UiAutomatorViewer
with the right Java location.
Download and launch uiautomatorviewer.bat
UIAutomatorViewer
windows should appear.
...
Method 2 : Create your own script
Open a new terminal in Start Menu, by searching
command prompt
. You can also access to command prompt by typingcmd
in Run (Windows
+R
)Try the following command:
...
Check your java version with the following command:
Code Block | ||
---|---|---|
| ||
java -version |
Method 1: Launch UIAutomatorViewer without installing Java 1.8
Use the following command to launch UIAutomatorViewer:
Code Block | ||
---|---|---|
| ||
java -Xmx1600M -Dcom.android.uiautomator.bindir="%ANDROID_HOME%\tools" -cp "%ANDROID_HOME%\tools\lib\x86_64\swt.jar";"%ANDROID_HOME%\tools\lib\*" com.android.uiautomator.UiAutomatorViewer |
UiAutomatorViewer
should be able to start and appears. This command is not easy to use neither to remember so we will create a shortcut.
In Start Menu, open
Notepad
Copy the previous command line inside the file
Click on
File/Save As...
and choose a locationChange file name with
uiautomatorviewer.bat
: extension format.bat
is importantTry to open your new file and verify
UiAutomatorViewer
is correctly working
Tip |
---|
Optional: To be able to run quickly
|
...
Method 2: Launch UIAutomatorViewer with Java 1.8
Install Java 1.8 by getting it on the Oracle website. You need to create an account.
Launch UIAutomatorViewer with the following command:
Code Block | ||
---|---|---|
| ||
uiautomatorviewer.bat |
The following program appears:
...