我跑
时出现此错误离子构建android
错误截图
C:\Users\Ahmed\IonicProjects\first\firstIonicApp>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Ahmed\IonicProjects
\first\firstIonicApp\hooks\after_prepare\010_add_platform_class.js C:\Users\Ahme
d\IonicProjects\first\firstIonicApp
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\Ahmed\IonicProjects
\first\firstIonicApp\hooks\after_prepare\020_remove_sass_from_platforms.js C:\Us
ers\Ahmed\IonicProjects\first\firstIonicApp
Running command: C:\Users\Ahmed\IonicProjects\first\firstIonicApp\platforms\andr
oid\cordova\build.bat
ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
Built the following apk(s):
另外我想知道用自耕农引导离子项目是否更好? 我已经看过几个教程。
答案 0 :(得分:2)
根据此link,您需要执行以下操作:
答案 1 :(得分:0)
看起来你没有apache ant installed.go到:http://ant.apache.org/并安装了apache ant然后在你的系统varriables中创建一个可变的ANT_HOME并将你的ant位置添加到你的PATH varriable