英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论