简体   繁体   中英

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.

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. I am using Java 9 for my system but for Android Studio, I am using its embedded JDK. So far, I have tried to:

  • Uninstalling and reinstalling Android Studio
  • Running device monitor with sudo command
  • Setting JDK's path to Java 9 (which seems to be unsupported as Gradle could not sync)
  • Redownloading JDK with Homebrew

I could not find many solutions online for the Mac OS and the few I found did not work. Please help!

I realize that Device Monitor is dependent on the java version you have installed on your machine . I downgraded to Java 8 and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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