web-dev-qa-db-ja.com

Android Device Monitorは、Android StudioまたはTerminal-UnsupportedClassVersionErrorから起動しません

MacのAndroid Studioの[ツール]ウィンドウからAndroidデバイスモニターを起動しようとすると、次のエラーが表示されます。

enter image description here

ログファイルを開くと、これに似た他のSO質問と非常によく似たエラーレポートが見つかります。esp this one 。ただし、Sudoを使用しても機能しませんでしたが、はるかに短いものの、同様のエラーデータが表示されます。

Macs-MBP:tools macuser$ Sudo ./monitor
Password:
Exception in thread "main" Java.lang.UnsupportedClassVersionError: com/Android/archquery/Main : Unsupported major.minor version 52.0
    at Java.lang.ClassLoader.defineClass1(Native Method)
    at Java.lang.ClassLoader.defineClassCond(ClassLoader.Java:637)
    at Java.lang.ClassLoader.defineClass(ClassLoader.Java:621)
    at Java.security.SecureClassLoader.defineClass(SecureClassLoader.Java:141)
    at Java.net.URLClassLoader.defineClass(URLClassLoader.Java:283)
    at Java.net.URLClassLoader.access$000(URLClassLoader.Java:58)
    at Java.net.URLClassLoader$1.run(URLClassLoader.Java:197)
    at Java.security.AccessController.doPrivileged(Native Method)
    at Java.net.URLClassLoader.findClass(URLClassLoader.Java:190)
    at Java.lang.ClassLoader.loadClass(ClassLoader.Java:306)
    at Sun.misc.Launcher$AppClassLoader.loadClass(Launcher.Java:301)
    at Java.lang.ClassLoader.loadClass(ClassLoader.Java:247)
./monitor: line 41: /Users/macuser/Library/Android/sdk/tools/lib/monitor-/monitor.app/Contents/MacOS/monitor: No such file or directory
./monitor: line 41: exec: /Users/macuser/Library/Android/sdk/tools/lib/monitor-/monitor.app/Contents/MacOS/monitor: cannot execute: No such file or directory

バックストーリー:このラップトップ(El Capitan)に完全なAndroid Studioのインストールを完了した後、IDE内からモニターを起動しようとしました。それを実行するにはJava 1.6が必要であると不平を言いました。そこで、Java 6をインストールしました。それを試してみると、上記のエラーメッセージが表示されました。

Terminal Java_home -Vから実行すると、次のようになります

Matching Java Virtual Machines (2):
    1.6.0_65-b14-468, x86_64:   "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

ログファイルの内容は次のとおりです(残念ながら、投稿のテキストエントリの制限のために一部を除外する必要がありました)。

!SESSION 2017-03-07 14:46:16.923 -----------------------------------------------
Eclipse.buildId=unknown
Java.version=1.6.0_65
Java.vendor=Apple Inc.
BootLoader constants: OS=macosx, Arch=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -keyring /Users/macuser/.Eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -Arch x86_64 -data @noDefault -keyring /Users/macuser/.Eclipse_keyring -showlocation

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.397
!MESSAGE Bundle reference:file:org.Apache.ant_1.8.3.v201301120609/@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.400
!MESSAGE Bundle reference:file:org.Apache.jasper.glassfish_2.2.2.v201205150955.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.401
!MESSAGE Bundle reference:file:org.Apache.lucene.core_2.9.1.v201101211721.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.424
!MESSAGE Bundle reference:file:org.Eclipse.help.base_3.6.101.v201302041200.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.425
!MESSAGE Bundle reference:file:org.Eclipse.help.ui_3.5.201.v20130108-092756.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.425
!MESSAGE Bundle reference:file:org.Eclipse.help.webapp_3.6.101.v20130116-182509.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.426
!MESSAGE Bundle reference:file:org.Eclipse.jetty.server_8.1.3.v20120522.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.429
!MESSAGE Bundle reference:file:org.Eclipse.platform.doc.user_4.2.2.v20130121-200410.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.430
!MESSAGE Bundle reference:file:org.Eclipse.team.core_3.6.100.v20120524-0627.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.430
!MESSAGE Bundle reference:file:org.Eclipse.team.ui_3.6.201.v20130125-135424.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.431
!MESSAGE Bundle reference:file:org.Eclipse.ui.cheatsheets_3.4.200.v20120521-2344.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.432
!MESSAGE Bundle reference:file:org.Eclipse.ui.intro_3.4.200.v20120521-2344.jar@4 not found.

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:17.924
!MESSAGE An error occurred while automatically activating bundle com.Android.ide.Eclipse.monitor (4).
!STACK 0
org.osgi.framework.BundleException: The activator com.Android.ide.Eclipse.monitor.MonitorPlugin for bundle com.Android.ide.Eclipse.monitor is invalid
    at org.Eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.Java:172)
    at org.Eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.Java:679)
    at org.Eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.Java:381)
    at org.Eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.Java:300)
    at org.Eclipse.osgi.framework.util.SecureAction.start(SecureAction.Java:440)
    at org.Eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.Java:263)
    at org.Eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.Java:107)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.Java:469)
    at org.Eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.Java:216)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.Java:395)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.Java:464)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.Java:421)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.Java:412)
    at org.Eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.Java:107)
    at Java.lang.ClassLoader.loadClass(ClassLoader.Java:247)
    at org.Eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.Java:340)
    at org.Eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.Java:229)
    at org.Eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.Java:1212)
    at org.Eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.Java:174)
    at org.Eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.Java:905)
    at org.Eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.Java:243)
    at org.Eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.Java:55)
    at org.Eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.Java:191)
    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(NativeMethodAccessorImpl.Java:39)
    at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:25)
    at Java.lang.reflect.Method.invoke(Method.Java:597)
    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)
Caused by: Java.lang.UnsupportedClassVersionError: com/Android/prefs/AndroidLocation$AndroidLocationException : Unsupported major.minor version 52.0
    at Java.lang.ClassLoader.defineClass1(Native Method)
    at Java.lang.ClassLoader.defineClassCond(ClassLoader.Java:637)
    at Java.lang.ClassLoader.defineClass(ClassLoader.Java:621)
    at org.Eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.Java:188)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.Java:632)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.Java:614)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.Java:568)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.Java:492)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.Java:465)
    at org.Eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.Java:216)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.Java:395)
    at org.Eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.Java:35)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.Java:461)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.Java:421)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.Java:412)
    at org.Eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.Java:107)
    at Java.lang.ClassLoader.loadClass(ClassLoader.Java:247)
    at com.Android.ide.Eclipse.monitor.MonitorPlugin.<clinit>(MonitorPlugin.Java:28)
    at Sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at Sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.Java:39)
    at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.Java:27)
    at Java.lang.reflect.Constructor.newInstance(Constructor.Java:513)
    at Java.lang.Class.newInstance0(Class.Java:357)
    at Java.lang.Class.newInstance(Class.Java:310)
    at org.Eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.Java:167)
    ... 33 more

!ENTRY org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Eclipse.equinox.http.jetty_3.0.1.v20121109-203239.jar was not resolved.
!SUBENTRY 2 org.Eclipse.equinox.http.jetty 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Eclipse.jetty.server.ssl_[8.0.0,9.0.0).
!SUBENTRY 2 org.Eclipse.equinox.http.jetty 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Eclipse.jetty.server.nio_[8.0.0,9.0.0).
!SUBENTRY 2 org.Eclipse.equinox.http.jetty 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Eclipse.jetty.server.session_[8.0.0,9.0.0).
!SUBENTRY 2 org.Eclipse.equinox.http.jetty 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Eclipse.jetty.server_[8.0.0,9.0.0).
!SUBENTRY 2 org.Eclipse.equinox.http.jetty 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Eclipse.jetty.server.bio_[8.0.0,9.0.0).
!SUBENTRY 2 org.Eclipse.equinox.http.jetty 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Eclipse.jetty.server.handler_[8.0.0,9.0.0).
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Eclipse.ltk.ui.refactoring_3.7.0.v20120523-1543.jar was not resolved.
!SUBENTRY 2 org.Eclipse.ltk.ui.refactoring 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing required bundle org.Eclipse.team.core_[3.4.100,4.0.0).
!SUBENTRY 2 org.Eclipse.ltk.ui.refactoring 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing required bundle org.Eclipse.team.ui_[3.4.100,4.0.0).
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Eclipse.platform_4.2.2.v201302041200/ was not resolved.
!SUBENTRY 2 org.Eclipse.platform 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing required bundle org.Eclipse.ui.intro_[3.2.0,4.0.0).
!SUBENTRY 2 org.Eclipse.platform 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=JavaSE)(version=1.4))(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Eclipse.ui.intro.universal_3.2.600.v20120912-155524/ was not resolved.
!SUBENTRY 2 org.Eclipse.ui.intro.universal 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing required bundle org.Eclipse.ui.intro_[3.4.0,4.0.0).
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Eclipse.equinox.jsp.jasper_1.0.400.v20120912-130548.jar was not resolved.
!SUBENTRY 2 org.Eclipse.equinox.jsp.jasper 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Apache.jasper.servlet_[0.0.0,6.0.0).
!SUBENTRY 2 org.Eclipse.equinox.jsp.jasper 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Apache.lucene_2.9.1.v201101211721.jar was not resolved.
!SUBENTRY 2 org.Apache.lucene 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing required bundle org.Apache.lucene.core_[2.9.1,3.0.0).
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Eclipse.jetty.security_8.1.3.v20120522.jar was not resolved.
!SUBENTRY 2 org.Eclipse.jetty.security 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Eclipse.jetty.server_[8.1.0,9.0.0).
!SUBENTRY 2 org.Eclipse.jetty.security 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing imported package org.Eclipse.jetty.server.handler_[8.1.0,9.0.0).
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Apache.lucene.analysis_2.9.1.v201101211721.jar was not resolved.
!SUBENTRY 2 org.Apache.lucene.analysis 2 0 2017-03-07 14:46:18.017
!MESSAGE Missing required bundle org.Apache.lucene.core_[2.9.1,3.0.0).
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.017
!MESSAGE Bundle initial@reference:file:plugins/org.Eclipse.jetty.servlet_8.1.3.v20120522.jar was not resolved.
!SUBENTRY 2 org.Eclipse.jetty.servlet 2 0 2017-03-07 14:46:18.018
!MESSAGE Missing imported package org.Eclipse.jetty.server.handler_[8.1.0,9.0.0).
!SUBENTRY 2 org.Eclipse.jetty.servlet 2 0 2017-03-07 14:46:18.018
!MESSAGE Missing imported package org.Eclipse.jetty.server.session_[8.1.0,9.0.0).
!SUBENTRY 2 org.Eclipse.jetty.servlet 2 0 2017-03-07 14:46:18.018
!MESSAGE Missing imported package org.Eclipse.jetty.server.nio_[8.1.0,9.0.0).
!SUBENTRY 2 org.Eclipse.jetty.servlet 2 0 2017-03-07 14:46:18.018
!MESSAGE Missing imported package org.Eclipse.jetty.server_[8.1.0,9.0.0).
!SUBENTRY 2 org.Eclipse.jetty.servlet 2 0 2017-03-07 14:46:18.018
!MESSAGE Missing imported package org.Eclipse.jetty.server.ssl_[8.1.0,9.0.0).
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.018
!MESSAGE Bundle initial@reference:file:plugins/org.Eclipse.equinox.jsp.jasper.registry_1.0.300.v20120912-130548.jar was not resolved.
!SUBENTRY 2 org.Eclipse.equinox.jsp.jasper.registry 2 0 2017-03-07 14:46:18.018
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=CDC/Foundation)(version=1.0))(&(osgi.ee=JavaSE)(version=1.3)))".

!ENTRY org.Eclipse.osgi 2 0 2017-03-07 14:46:18.037
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.Eclipse.osgi 2 0 2017-03-07 14:46:18.037
!MESSAGE Bundle org.Apache.lucene_2.9.1.v201101211721 [24] was not resolved.
!SUBENTRY 2 org.Apache.lucene 2 0 2017-03-07 14:46:18.037
!MESSAGE Missing required bundle org.Apache.lucene.core_[2.9.1,3.0.0).
!SUBENTRY 2 org.Apache.lucene 2 0 2017-03-07 14:46:18.037
!MESSAGE Missing optionally required bundle org.Apache.lucene.analysis_[2.9.1,3.0.0).
!SUBENTRY 2 org.Apache.lucene 2 0 2017-03-07 14:46:18.037
!MESSAGE Missing optionally required bundle org.Apache.lucene.highlighter_[2.9.1,3.0.0).
!SUBENTRY 2 org.Apache.lucene 2 0 2017-03-07 14:46:18.037
!MESSAGE Missing optionally required bundle org.Apache.lucene.memory_[2.9.1,3.0.0).
!SUBENTRY 2 org.Apache.lucene 2 0 2017-03-07 14:46:18.037
!MESSAGE Missing optionally required bundle org.Apache.lucene.queries_[2.9.1,3.0.0).

. . .

!ENTRY org.Eclipse.osgi 4 0 2017-03-07 14:46:18.041
!MESSAGE Application error
!STACK 1
org.Eclipse.core.runtime.CoreException: Plug-in com.Android.ide.Eclipse.monitor was unable to load class com.Android.ide.Eclipse.monitor.MonitorApplication.
    at org.Eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.Java:194)
    at org.Eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.Java:176)
    at org.Eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.Java:905)
    at org.Eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.Java:243)
    at org.Eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.Java:55)
    at org.Eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.Java:191)
    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(NativeMethodAccessorImpl.Java:39)
    at Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:25)
    at Java.lang.reflect.Method.invoke(Method.Java:597)
    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)
Caused by: org.osgi.framework.BundleException: The activator com.Android.ide.Eclipse.monitor.MonitorPlugin for bundle com.Android.ide.Eclipse.monitor is invalid
    at org.Eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.Java:172)
    at org.Eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.Java:679)
    at org.Eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.Java:381)
    at org.Eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.Java:300)
    at org.Eclipse.osgi.framework.util.SecureAction.start(SecureAction.Java:440)
    at org.Eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.Java:263)
    at org.Eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.Java:107)
    ... 27 more
Caused by: Java.lang.UnsupportedClassVersionError: com/Android/prefs/AndroidLocation$AndroidLocationException : Unsupported major.minor version 52.0
    at Java.lang.ClassLoader.defineClass1(Native Method)
    at Java.lang.ClassLoader.defineClassCond(ClassLoader.Java:637)
    at Java.lang.ClassLoader.defineClass(ClassLoader.Java:621)
    at org.Eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.Java:188)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.Java:632)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.Java:614)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.Java:568)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.Java:492)
    at org.Eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.Java:465)
    at org.Eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.Java:216)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.Java:395)
    at org.Eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.Java:35)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.Java:461)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.Java:421)
    at org.Eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.Java:412)
    at org.Eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.Java:107)
    at Java.lang.ClassLoader.loadClass(ClassLoader.Java:247)
    at com.Android.ide.Eclipse.monitor.MonitorPlugin.<clinit>(MonitorPlugin.Java:28)
    at Sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at Sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.Java:39)
    at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.Java:27)
    at Java.lang.reflect.Constructor.newInstance(Constructor.Java:513)
    at Java.lang.Class.newInstance0(Class.Java:357)
    at Java.lang.Class.newInstance(Class.Java:310)
    at org.Eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.Java:167)
    ... 33 more
27
Alyoshak

私は同じ問題を抱えています。ログファイルに基づいて、Android Studioに必要なJava 8 "サポートされていないmajor.minorバージョン52.0": nsupported major.minorバージョン52.

Linuxを実行していますが、現在Java8がインストールされているため、使用する必要がありました。

update-alternatives --config Java

そして

update-alternatives --config javac

その後、すべてが機能しました。

Macを使用しているかのように見えるため、Java 8をインストールした後に次の操作を行う必要がある場合とそうでない場合があります。 Installed Java = Mac OS Xでは7ですが、ターミナルはまだバージョン6を使用しています

サポートされていないmajor.minorバージョン52. ソース: wikipedia からの情報

  • J2SE 8 =52
  • J2SE 7 = 51
  • J2SE 6.0 = 50
  • J2SE 5.0 = 49
  • JDK 1.4 = 48
  • JDK 1.3 = 47
  • JDK 1.2 = 46
  • JDK 1.1 = 45
15
James Nelson

紛らわしいことに、共有場所にJava 8をインストールしていません(Android Studio)にバンドルされているバージョンのみ。homebrewを使用してインストールすると問題が解決しました。

brew cask install Java

$ Java -version
Java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
7
Inti

Android Studioには、Java 1.8が組み込まれています。したがって、開発中の問題はありませんでしたAndroidアプリ。ただし、起動時Android Device Monitorは、OSで実行される外部Javaコンパイラを使用します。以前にJavaをプレインストールしている場合、そうでなければ、あなたは同じ問題に直面するでしょう。

Java_HOMEパスをJava Packed in Android Studioに設定しようとしました。おそらくopenjdkバージョンであるため、動作しません。

私の解決策は、OracleからJava JDK 1.8をダウンロードして、コンピューターにインストールすることでした。

3
4tee

上記の答えは私にはうまくいきませんでした。私はJava8を使用しています。両方ともAndroid Java_HOMEおよび/usr/bin/Java。私にとって奇妙なのは、私のtools /ディレクトリにもuiautomationviewerツールが欠けていることです。だから、インストール中に何かがうまくいかなかったのだろうかと思いました。

私がやったことは、古いバージョンのSDK-toolsをダウンロードすることでした(指示に従って here )、sdk/toolsフォルダ全体を置き換えました。そしてそれは働いた....

0
katie

同じ問題がありました。 Win10 + JDK 12 + Android Sdk。「monitor.bat」を実行したとき、それはまったく同じ問題です。モニターアプリケーションは最新のJavaバージョンの命名規則JRE 8をインストールすると(次のように)、問題はなくなりました。

c:\>Java -version Java version "1.8.0_221" Java(TM) SE Runtime Environment (build 1.8.0_221-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

0
user9736507

Sdk/tools/monitor.batを右クリックして、「管理者として実行」をクリックしてください。

0
Fly Later

MacOS Sierra 10.12.6 Android Studio 3.0.1で同じ問題が発生しました

以下によって解決されました:UninstallingJava SE Development Kit 8u152AndInstallingJava SE Development Kit8u151from: http://www.Oracle.com/technetwork/Java/javase/downloads/jdk8-downloads-2133151.html

0
Sergio Odintsov