Android工作室设备显示器无法在Mac上打开?

时间:2018-01-18 23:01:32

标签: java android macos android-studio android-device-monitor

我的Android Studio版本是3.0.1,在Macbook Pro上运行JRE 1.8.0_152。

每次打开设备监视器的尝试都会出现以下错误消息:

See the log file
/Users/MyName/Library/Android/sdk/tools/lib/monitor-x86_64/configuration/1516320779478.log.

以下是错误日志:

!MESSAGE Missing imported package org.w3c.dom_0.0.0.
!SUBENTRY 2 org.w3c.dom.smil 2 0 2018-01-18 13:26:15.802
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE)(version=1.4))(&(osgi.ee=JavaSE)(version=1.3))(&(osgi.ee=CDC/Foundation)(version=1.0)))".
!SUBENTRY 1 org.eclipse.osgi 2 0 2018-01-18 13:26:15.802
!MESSAGE Bundle org.w3c.dom.svg_1.1.0.v201011041433 [175] was not resolved.
!SUBENTRY 2 org.w3c.dom.svg 2 0 2018-01-18 13:26:15.802
!MESSAGE Missing required bundle org.w3c.dom.smil_[1.0.0,1.1.0).
!SUBENTRY 2 org.w3c.dom.svg 2 0 2018-01-18 13:26:15.802
!MESSAGE Missing imported package org.w3c.dom_0.0.0.
!SUBENTRY 2 org.w3c.dom.svg 2 0 2018-01-18 13:26:15.802
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE)(version=1.4))(&(osgi.ee=JavaSE)(version=1.3))(&(osgi.ee=CDC/Foundation)(version=1.0)))".

!ENTRY org.eclipse.osgi 4 0 2018-01-18 13:26:15.804
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

我刚刚使用推荐的设置下载了Android Studio,因此我不确定它为何无法正常运行。我在我的系统中使用Java 9,但对于Android Studio,我使用的是嵌入式JDK。到目前为止,我试图:

  • 卸载并重新安装Android Studio
  • 使用sudo命令运行设备监视器
  • 设置JDK的Java 9路径(由于Gradle无法同步,似乎不支持)
  • 使用Homebrew重新加载JDK

我找不到很多适用于Mac OS的在线解决方案,而且我找到的少数解决方案无效。请帮忙!

1 个答案:

答案 0 :(得分:0)

我发现设备监视器依赖于您在计算机上安装的java版本。我降级到Java 8并且它有效。