启动monitor出现Failed to create the Java Virtual Machine报错解决方案

一、在android-sdk tools目录下双击启动monitor出现Failed to create the Java Virtual Machine报错,并且命令行出现文件不存在的错误提示,如下图

 

 


 

二、解决方案

执行以下命令之后从新双击monitor即可启动成功

sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home/lib/libserver.dylib