目录:D:Javaandroid-sdk-windows ools
右键monitor.bat管理员运行,出现一闪而退的情况
解决过程:
1、进入控制台,并进入D:Javaandroid-sdk-windows ools,运行android.bat,出现错误:
D:Javaandroid-sdk-windows ools>android.bat
无效驱动器规格
ERROR: SWT folder '' does not exist.
Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.
解决方法:
打开android.bat文件,并注释掉java_exe这两行,重新修改如下,即直接设置路径。
::set java_exe=
::call libfind_java.bat
set java_exe=D:Javajdk1.8.0_162injava.exe
2、再次运行monitor.bat依然出现此情况,于是使用控制台直接运行monitor.bat,会弹出一个错误报告的文件路径,打开后有看到报空针的错误:
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
at org.eclipse.core.runtime.URIUtil.toURI(URIUtil.java:280)
at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:127)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:370)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:220)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:557)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.android.ide.eclipse.monitor.MonitorApplication.start(MonitorApplication.java:86)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)
解决方法:
- 打开任务管理器,并结束进程为monitor.bat的进程
- 删除monitor-workspace整个目录,我本地在:C:Usersadmin.androidmonitor-workspace
删除成功后,再次运行monitor.bat,成功。