When I try to start uiautomatorviewer.bat i get this error:
ERROR: No suitable Java found. In order to properly use the Android Developer Tools, you need a suitable version of Java JDK installed on your system. We recommend that you install the JDK version of JavaSE, available here: http://www.oracle.com/technetwork/java/javase/downloads
If you already have Java installed, you can define the JAVA_HOME environment variable in Control Panel / System / Avanced System Settings to point to the JDK folder.
You can find the complete Android SDK requirements here: http://developer.android.com/sdk/requirements.html
I have a working JDK at C:\Program Files\Java\jdk-9
My system variables are:
JAVA_HOME C:\Program Files\Java\jdk-9
PATH C:\Program Files\Java\jdk-9\bin;D:\Prac\AndroidSDK\platform-tools\bin;D:\Prac\AndroidSDK\tools\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%ANDROID_HOME%;%ANDROID_HOME%\build-tools\25.0.3;D:\Prac\nodejs\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
( ANDROID_HOME D:\Prac\AndroidSDK )
My java version:
java version "9" Java(TM) SE Runtime Environment (build 9+181) Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
echo %JAVA_HOME% is working OK (printing correct path).
I tried setting JAVA_HOME variable in the .bat script. That didn't work. (But that might be because I'm not sure where exactly in the script should I include it...)
Do you have any idea how to solve this?
Eureka! The problem was that I was using 64bit JDK.
After installation of 32bit version all I needed to do was to set ANDROID_SWT system variable and it is working now.