简体   繁体   English

Android Studio设备监视器无法在Mac上打开?

[英]Android studio device monitor doesn't open on mac?

My Android Studio version is 3.0.1 running JRE 1.8.0_152 on a Macbook Pro. 我的Android Studio版本是3.0.1,在Macbook Pro上运行JRE 1.8.0_152。

Every attempt at opening device monitor is followed by this error message: 每次尝试打开设备监视器时,都会出现以下错误消息:

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

Here is the error 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)

I have just recently downloaded Android Studio with recommended settings so I'm not sure why it's not functioning properly. 我最近下载了具有建议设置的Android Studio,因此不确定它为什么不能正常运行。 I am using Java 9 for my system but for Android Studio, I am using its embedded JDK. 我在系统上使用Java 9,但在Android Studio中,使用的是嵌入式JDK。 So far, I have tried to: 到目前为止,我已经尝试:

  • Uninstalling and reinstalling Android Studio 卸载并重新安装Android Studio
  • Running device monitor with sudo command 使用sudo命令运行设备监视器
  • Setting JDK's path to Java 9 (which seems to be unsupported as Gradle could not sync) 将JDK的路径设置为Java 9(由于Gradle无法同步,因此似乎不受支持)
  • Redownloading JDK with Homebrew 使用Homebrew重新下载JDK

I could not find many solutions online for the Mac OS and the few I found did not work. 我找不到用于Mac OS的许多在线解决方案,而我发现的一些解决方案无效。 Please help! 请帮忙!

I realize that Device Monitor is dependent on the java version you have installed on your machine . 我知道设备监视器取决于您在计算机上安装的Java版本 I downgraded to Java 8 and it worked. 我降级到Java 8并成功了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM