An error has occurred on Android Device Monitor

第一次在mac本上使用Android Device Monitor的时候报的错误

An error has occurred on Android Device Monitor_第1张图片
图1
An error has occurred on Android Device Monitor_第2张图片
图2

其实问题就是这样的:

  • Android Device Monitor doesn't open - error on log file
    https://stackoverflow.com/questions/27526596/android-device-monitor-doesnt-open-error-on-log-file
  • 其中有一个解决方法可以尝试一下
    I had the same issue with Mac OS X.
    To solve it:
    ● Open a terminal window
    ● Navigate to your SDK
    ● Locate the 'tools' folder
    ● cd into it
    ● run: sudo ./monitor
    ● Type in your password
    Good to go!

然而却报了如下的错误:

An error has occurred on Android Device Monitor_第3张图片
图3.png

继续找解决方案
Android Device Monitor will not launch, either from Android Studio or from Terminal — UnsupportedClassVersionError
https://stackoverflow.com/questions/42661578/android-device-monitor-will-not-launch-either-from-android-studio-or-from-termi?noredirect=1&lq=1

其实最终发现只需要安装最新的jdk1.8即可。

苹果系统已经包含完整的J2SE,其中就有JDK和JVM(苹果叫VM)。当然如果要升级JDK,那当然要自己下载安装了。 在MAC系统中,jdk的安装路径与windows不同,默认目录是:/System/Libray/Frameworks/JavaVM.Framwork/。
在这个目录下有个Versions目录,里面有不同版本的jdk。

Mac系统自带的jdk路径
An error has occurred on Android Device Monitor_第4张图片
用户安装的jdk路径

当然如果还有在Mac系统下切换jdk的需求可以参考
http://www.jianshu.com/p/91bbb537fd52

只是做一个简单的记录!

  • 我的CSDN博客地址:http://blog.csdn.net/s003603u
  • 我的GitHub地址:https://github.com/soulrelay

你可能感兴趣的:(An error has occurred on Android Device Monitor)