Android设备监视器未打开 [英] Android Device Monitor not opening
问题描述
我无法运行Android Monitor。我正在使用Android Studio。不是Eclipse。
I am unable to run Android Monitor. I am using Android Studio. Not Eclipse.
- 当我尝试在终端中使用sudo ./monitor打开它时,看到以下警告,然后显示
警告:发生了非法的反射访问操作警告:
$ b的非法反射访问$ b org.eclipse.osgi.internal.baseadaptor.BaseStorage
(文件:/Users/kidus11/Library/Android/sdk/tools/lib/monitor-x86_64/plugins/org.eclipse.osgi_3.8.2.v20130124 -134944.jar)
到方法java.net.URLClassLoader.addURL(java.net.URL)警告:请
考虑将此报告给
的维护者org.eclipse.osgi.internal .baseadaptor.BaseStorage警告:使用
--illegal-access = warn启用进一步非法反射访问操作的警告警告:所有非法访问操作将在以后的版本中被拒绝
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.eclipse.osgi.internal.baseadaptor.BaseStorage (file:/Users/kidus11/Library/Android/sdk/tools/lib/monitor-x86_64/plugins/org.eclipse.osgi_3.8.2.v20130124-134944.jar) to method java.net.URLClassLoader.addURL(java.net.URL) WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.internal.baseadaptor.BaseStorage WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release
- 我有Java版本9,也有Javac 9版本
- 我已经安装了最新版本的JDK或JRE
这是我每次尝试打开Android Device Monitor时看到的标签
Here is the tag I see every time I try to open Android Device Monitor
!ENTRY org.eclipse.osgi 4 0 2017-10-04 20:18:12.531!MESSAGE
应用程序错误!STACK 1 java.lang.IllegalStateException :无法
获得应用程序服务。确保已解析并启动org.eclipse.core.runtime
捆绑包(请参阅config.ini)。在
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)在
org.eclipse.core.runtime.adaptor.EclipseStarter.run( EclipseStarter.java:353)
在
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
在
java.base / jdk。在
java.base / jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)在
java的internal.reflect.NativeMethodAccessorImpl.invoke0(本地
方法) .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)在
org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)在
org.eclipse.equinox .launcher.Main.run(Main.java:1438)
!ENTRY org.eclipse.osgi 4 0 2017-10-04 20:18:12.531 !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)
任何帮助将不胜感激!
Any help would be greatly appreciated!
推荐答案
Android Studio尚不支持Java 9。
安装JDK 8并更新Studio配置以指向8的jre。
Android Studio does not support Java 9 yet. Install JDK 8 and update your studio configurations to point the jre for 8.
然后确保您也没有将JAVA_HOME设置为9。
最后,确保您的日食未在拥有ADB所有权的计算机上运行。
Then ensure that you are not setting your JAVA_HOME to 9 yet either. Lastly, make sure you eclipse is not running somewhere on your machine taking ownership of the ADB already.
这篇关于Android设备监视器未打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!