::set system environment variable ::set ant environment variable setx ANT_HOME E:\tools\apache-ant-1.9.0 /m setx PATH "%PATH%;%ANT_HOME%\BIN" /m ::set android environment variable SETX ANDROID_HOME E:\android\android-sdk-windows /m SETX PATH "%PATH%;%ANDROID_HOME%\platform-tools" /m echo "设置成功" pause exit
需要管理员权限