Error while executing UIAUTOMATORVIEWER with Java11 installed and env path set right. I'm able to execute the appium tests with java11 though.
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
Edit: uiautomatorviewer works with java8, any workaround for java11?
This error has nothing to do with UIAutomatorViewer, but since it is an old tool it can rely on 32-bit JDK. You can check this answer for a fix.
If you are using Appium, UIAutomatorViewer is obviously a bad choice since Appium no longer use original UIAutomator under the hood: it was deprecated in favour of UiAutomator2 and Espresso drivers
You better try official Appium desktop instead