Android Device Monitor ne sera pas lancé, que ce soit à partir de Android Studio ou à partir de Terminal-UnsupportedClassVersionError

je reçois l'erreur suivante en essayant de lancer Android Device Monitor depuis la fenêtre Outils dans Android Studio sur un Mac.

enter image description here

et quand j'ouvre le fichier journal je trouve un rapport d'erreur très similaire à l'autre donc des questions similaires à ceci, esp celui-ci . Cependant, l'utilisation sudo n'a pas fonctionné pour moi, bien que j'obtienne des données d'erreur similaires, bien que beaucoup plus courtes:

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"151900920"0(URLClassLoader.java:58)
    at java.net.URLClassLoader.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

Backstory: après avoir fait une installation complète et Nouvelle Android Studio sur cet ordinateur portable (El Capitan), j'ai tenté de lancer le moniteur à partir de l'IDE. Il s'est plaint que son exécution nécessitait Java 1.6. J'ai donc installé la version 6 de Java. Puis quand je l'ai essayé j'ai eu le message d'erreur ci-dessus.

j'obtiens ce qui suit quand j'ai couru du 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

Le contenu du fichier journal sont (malheureusement dû

!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
26
demandé sur Community 2017-03-08 04:52:04

7 réponses

j'ai le même problème. Basé sur le fichier log, la nouvelle version D'Android Studio nécessite Java 8 "major non pris en charge.version mineure 52.0": non pris en charge majeure.version mineure 52.0

j'exécute Linux, j'ai actuellement java8 installé donc j'ai juste besoin d'utiliser:

update-alternatives --config java

et

update-alternatives --config javac

alors tout a fonctionné.

on dirait que vous utilisez un Mac, donc vous pouvez ou ne pas avoir besoin de faire ce qui suit après l'installation de Java 8: installé Java 7 sur Mac OS X mais le Terminal utilise toujours la version 6

Info de major non supporté.minor version 52.0 source: 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
répondu James Nelson 2017-05-23 12:02:48

ce qui est déconcertant, c'est que je n'avais pas installé Java 8 dans un emplacement partagé (seulement la version fournie dans Android Studio). L'installer par homebrew a résolu mon problème.

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
répondu Inti 2017-06-07 14:32:16

Android Studio est livré avec Java 1.8 intégré, donc ce n'était pas un problème lorsque vous développez android app. Mais lorsque vous lancez Android Device Monitor, il utilise un compilateur java externe qui s'exécute sur votre système D'exploitation. Si vous avez préinstallé Java avant, il ne sera pas un problème. Sinon, vous êtes confrontés au même problème.

j'ai essayé de mettre JAVA_HOME path à java emballé dans Android Studio. Il ne fonctionne pas, probablement parce qu'il est openjdk version.

My la solution était de télécharger Java JDK 1.8 à partir D'Oracle et d'installer dans mon ordinateur.

3
répondu 4tee 2017-06-14 01:29:37

Si vous ouvrez le message d'erreur particulier, vous verrez les premières ligne du message d'erreur comme ci-dessous.

!SESSION 2017-12-20 08:17:02.597 -----------------------------------------------
eclipse.buildId=unknown
java.version=9.0.1
java.vendor=Oracle Corporation

voilà ce que j'ai. J'ai installé java 8 et 9 sur mon mac et j'ai fait de java 8 la valeur par défaut. Selon le message d'erreur java virtual device a pris java 9 mais son besoin 8. C'est là que le probelm est arrivé.Donc j'ai désinstallé le java 9 de ma machine puis il a commencé à fonctionner très bien.

1
répondu Nishara MJ 2017-12-20 03:10:38

la réponse ci-dessus ne marchait pas pour moi. J'utilise JAVA8, à la fois L'Android JAVA_HOME et /usr/bin/java . Ce qui est encore plus bizarre pour moi, c'est que l'outil uiautomationviewer est également absent de mon répertoire/ outils. Je me suis donc demandé si quelque chose s'était mal passé pendant l'installation.

ce que j'ai fini par faire était de télécharger un verion plus ancien de SDK-tools (J'ai suivi les instructions ici ), et j'ai remplacé tout le dossier sdk/tools. Et cela a fonctionné....

0
répondu katie 2017-05-22 14:40:36

le même problème a été observé le: macOS Sierra 10.12.6 Android Studio 3.0.1

a été résolu par: désinstaller Java SE Development Kit 8u 152 Et installation Java SE Development Kit 8u151 de: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

0
répondu Sergio Odintsov 2017-12-26 19:20:31

essayez de faire un clic droit sur sdk/tools / monitor.bat et cliquez sur" Exécuter en tant qu'administrateur "

0
répondu Fly Later 2018-06-16 06:13:24