monitor.bat无法打开 An error has occurred. See the log file解决办法

Posted guangdeshishe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了monitor.bat无法打开 An error has occurred. See the log file解决办法相关的知识,希望对你有一定的参考价值。

问题

双击monitor.bat时会弹出一个弹窗
在这里插入图片描述
通过查看该log文件,可以看到大概内容如下:

!SESSION 2021-05-29 17:34:03.247 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.9
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data @noDefault

!ENTRY org.eclipse.osgi 4 0 2021-05-29 17:34:04.517
!MESSAGE Bundle reference:file:org.apache.ant_1.8.3.v201301120609/@4 not found.
... ...
!ENTRY org.eclipse.core.runtime 4 0 2021-05-29 17:34:04.751
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "org.eclipse.core.runtime_3.8.0.v20120912-155025 [46]" could not be resolved. Reason: Missing Constraint: Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0,J2SE-1.3
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

解决办法:

通过log文件可以看到"java.version=11.0.9" java的版本是"11.0.9",但是我记得之前一直用的是"1.8.0",刚刚更新了android Studio版本,很可能是它自动给我升级了,解决办法其实也很简单,就是装回旧版jdk "1.8.0"就行了

以上是关于monitor.bat无法打开 An error has occurred. See the log file解决办法的主要内容,如果未能解决你的问题,请参考以下文章

安装软件失败(错误消息:An unknown error has occurred)

Android场景 - 005 - App布局查看

an error occurred怎么解决?

打开iTunes出现 an unknown error occurred(-45076)的解决办法

Android Studio 3.0以上找不到Android Device Monitor的解决/替代方法

Android studio3.1 Tools下面没有Android,怎么打开ddms?