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

后端 未结 8 2154
醉酒成梦
醉酒成梦 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

提交回复
热议问题