Flutter Doctor执行异常的解决办法

Command 'Flutter: Launch Emulator' resulted in an error ,(Invalid argument(s): Cannot find executable for null.)

先执行命令:

Flutter Doctor

若出现以上异常,执行如下命令:

flutter doctor

若执行sdkmanager -update出现如下异常:

java.lang.noclassdeffounderror javax/xml/bind/annotation/xmlschema flutter

可以是jdk版本出现问题,执行如现两个命令检查并确认,通常基于jdk8。

java -version

确认当前java命令所在目录:

where java