[英]UI Automator doesn't start in OSX
yogevabergel [~/Library/Android/sdk/tools/bin] $ ./uiautomatorviewer
-Djava.ext.dirs=/Users/yogevabergel/Library/Android/sdk/tools/lib/x86_64:/Users/yogevabergel/Library/Android/sdk/tools/lib is not supported. Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Any help? 有什么帮助吗? Nothing in the internet about it.
互联网上对此一无所知。
First, check you set properly system variables like JAVA_HOME & ANDROID_HOME and that tools are in place, easy way is to use appium-doctor
for this: 首先,检查您是否正确设置了JAVA_HOME和ANDROID_HOME之类的系统变量,并且工具是否到位,简单的方法是为此使用
appium-doctor
:
npm appium-doctor -g
appium-doctor --android
And fix any error you get. 并修复所有错误。
It can be also that you miss some component in android-sdk-tools: 也可能是您错过了android-sdk-tools中的某些组件:
Configure
=> SDK manager
Configure
=> SDK manager
Which java version are you running? 您正在运行哪个Java版本? I hit the same issue with Java v.10, installed Java v.8, updated ~/.bash_profile with
我在Java v.10中遇到了同样的问题,安装了Java v.8,并用〜/ .bash_profile更新了
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
and it helped. 它有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.