在执行ionic cordova platform add android时报Error: Command failed: wmic os get Caption错误;
仔细检查下发现是wmic问题;于是检查了一下环境变量没有添加wmic.
所以在环境变量的PATH添加:
1.win7添加格式
%SystemRoot%;%SystemRoot%\system32;%SystemRoot%\System32\Wbem
2.win10添加格式(新建三次)
%SystemRoot%
%SystemRoot%\system32
%SystemRoot%\System32\Wbem