简体   繁体   English

Appium 测试使用 java 11 执行,而 uiautomatorviewer 抛出错误。 java 11 是否支持 uiautomatorviewer?

[英]Appium tests executes with java 11 while uiautomatorviewer throws an error. Is uiautomatorviewer supported by java 11?

Error while executing UIAUTOMATORVIEWER with Java11 installed and env path set right.在安装了 Java11 并且设置了正确的 env 路径的情况下执行 UIAUTOMATORVIEWER 时出错。 I'm able to execute the appium tests with java11 though.不过,我可以使用 java11 执行 appium 测试。

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?编辑:uiautomatorviewer 适用于 java8,java11 有什么解决方法吗?

This error has nothing to do with UIAutomatorViewer, but since it is an old tool it can rely on 32-bit JDK.此错误与 UIAutomatorViewer 无关,但由于它是一个旧工具,它可以依赖 32 位 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如果您使用的是 Appium,那么UIAutomatorViewer显然是一个糟糕的选择,因为 Appium 不再使用原始的 UIAutomator:它已被弃用,取而代之的是 UiAutomator2 和 Espresso 驱动程序

You better try official Appium desktop instead你最好试试官方 Appium 桌面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM