uiautomatorviewer 在使用 Java 11 时会出现错误。uiautomatorviewer 是否支持 Java 11?

huangapple go评论52阅读模式
英文:

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

问题

无法找到合适的Java。为了正确使用Android开发工具,您需要在系统上安装合适版本的Java JDK。我们建议您安装JavaSE的JDK版本,可以在这里找到:http://www.oracle.com/technetwork/java/javase/downloads

如果您已经安装了Java,您可以在控制面板/系统/高级系统设置中定义JAVA_HOME环境变量,指向JDK文件夹。

您可以在这里找到完整的Android SDK要求:http://developer.android.com/sdk/requirements.html

编辑:
UIAutomatorViewer适用于Java 8,是否有适用于Java 11的解决方法?

英文:

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?

答案1

得分: 1

这个错误与UIAutomatorViewer无关,但由于它是一个旧工具,它可能依赖于32位的JDK。你可以查看这个答案来修复它。

如果你正在使用Appium,UIAutomatorViewer显然是一个不好的选择,因为Appium不再在底层使用原始的UIAutomator:它已被弃用,取而代之的是UiAutomator2和Espresso驱动程序。

最好尝试使用官方的Appium桌面版

英文:

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

huangapple
  • 本文由 发表于 2020年8月2日 19:36:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/63215516.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定