Android Device Monitor will not launch, either from Android Studio or from Terminal — UnsupportedClassVersionError

后端 未结 8 2049
醉酒成梦
醉酒成梦 2020-12-09 08:11

I am getting the following error when trying to launch Android Device Monitor from the Tools window in Android Studio on a Mac.

and when I open the log file

相关标签:
8条回答
  • 2020-12-09 09:00

    I'm having the same issue. Based on the log file, the new version of Android Studio requires Java 8 "Unsupported major.minor version 52.0": Unsupported major.minor version 52.0

    I'm running Linux, I currently have java8 installed so I just needed to use:

    update-alternatives --config java
    

    and

    update-alternatives --config javac
    

    then everything worked.

    It looks as though you're using a Mac, so you may or may not need to do the following after installing Java 8: Installed Java 7 on Mac OS X but Terminal is still using version 6

    Info from Unsupported major.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
    0 讨论(0)
  • 2020-12-09 09:04

    I had the same problem. Win10 + JDK 12 + Android Sdk. When I ran "monitor.bat", it is the exactly the same problem. I guess monitor application can not reconginize the latest java version naming convention. I install JRE 8(as follows), the problem is gone.

    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 讨论(0)
提交回复
热议问题