java - missing - open android device monitor android studio
Android Device Monitor no se iniciarĂ¡, ya sea desde Android Studio o desde Terminal-UnsupportedClassVersionError (4)
La respuesta anterior no funcionó para mí. Estoy usando JAVA8, tanto el Android JAVA_HOME
como /usr/bin/java
. Lo que es más extraño para mí es que a mi directorio / herramientas también le falta la herramienta uiautomationviewer
. Entonces me hizo preguntarme si algo salió mal durante la instalación.
Lo que terminé haciendo fue descargar una versión anterior de SDK-tools (seguí las instrucciones aquí ) y reemplacé toda la carpeta sdk / tools. Y funcionó....
Recibo el siguiente error al intentar iniciar Android Device Monitor desde la ventana Herramientas en Android Studio en una Mac.
y cuando abro el archivo de registro, encuentro un informe de error muy similar a las otras preguntas de SO similares a esta, especialmente esta . Sin embargo, el uso de sudo no funcionó para mí, aunque obtengo datos de error similares, aunque mucho más cortos:
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
Trasfondo: Después de realizar una nueva y completa instalación de Android Studio en esta computadora portátil (El Capitan) intenté iniciar el monitor desde el interior del IDE. Se quejaba de que ejecutarlo requería Java 1.6. Así que instalé Java 6. Luego, cuando lo probé, recibí el mensaje de error anterior.
Obtuve lo siguiente cuando salí de 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
El contenido del archivo de registro es (lamentablemente tuvo que descartar algunos debido a las limitaciones de entrada de texto para la publicación):
!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
Estoy teniendo el mismo problema. En función del archivo de registro, la nueva versión de Android Studio requiere Java 8 "Mayoridad no admitida.minor versión 52.0": Mayor.minor versión no compatible 52.0
Estoy ejecutando Linux, actualmente tengo instalado java8, así que solo necesitaba usar:
update-alternatives --config java
y
update-alternatives --config javac
entonces todo funcionó.
Parece que está usando una Mac, por lo que puede o no necesitar hacer lo siguiente después de instalar Java 8: Java 7 instalado en Mac OS X pero la Terminal todavía está usando la versión 6
Información de Unsupported major.minor versión 52.0 fuente: 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
Confusamente, no tenía Java 8 instalado en una ubicación compartida (solo la versión incluida en Android Studio). Instalarlo a través de homebrew resolvió mi problema.
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)
Android Studio viene con Java 1.8 incorporado, por lo que no fue un problema cuando estás desarrollando una aplicación de Android. Pero cuando inicia Android Device Monitor, usa un compilador Java externo que se ejecuta en su sistema operativo. Si preinstaló Java antes, no será un problema. De lo contrario, enfrentarás el mismo problema.
Intenté establecer la ruta JAVA_HOME en java empaquetado en Android Studio. No funciona, probablemente porque es la versión de openjdk.
Mi solución fue descargar Java JDK 1.8 de Oracle e instalarlo en mi computadora.