无法在Mac High Sierra上打开UIAutomatorviewer

我们有配备High Sierra(10.13.6)的全新MacBook。其他系统信息:

JAVA Version: java version "11.0.1" 2018-10-16 LTS

JAVA_HOME:/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home

尝试打开Android UIAutomatorViwer时,出现以下错误:

/Library/Android/sdk/tools/bin/uiautomatorviewer ; exit;

/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. logout Saving session… …copying shared

history… …saving history…truncating history files… …completed.

Deleting expired sessions…111 completed.

更多详细信息:Java位于:/ usr / bin / java

回答:

  • 安装了较旧的Java(8)JDK
  • 在JAVA_HOME中将Java版本更新为1.8

用于更新Java版本的命令:

cd ~/

vim ~/.bash_profile

Updated the JAVA_HOME

Save in vim using :wq!

source ~/.bash_profile

以上是 无法在Mac High Sierra上打开UIAutomatorviewer 的全部内容, 来源链接: utcz.com/qa/424543.html

回到顶部