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

后端 未结 8 2147
醉酒成梦
醉酒成梦 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 08:44

    Android Studio comes with built-in Java 1.8, so it wasn't a problem when you are developing android app. But when you launch Android Device Monitor, it uses external java compiler that run on your OS. If you have preinstalled Java before, it won't be a problem. Otherwise, you will face the same problem.

    I tried to set JAVA_HOME path to java packed in Android Studio. It does not work, probably because it is openjdk version.

    My solution was to download Java JDK 1.8 from Oracle and install in my computer.

提交回复
热议问题