~/PhoneGap/app-hello-world$ cordova platform add android
[Error: An error occured during creation of android sub-project.
/home/jj/.cordova/lib/android/cordova/3.0.0/bin/create: line 104: ant: command not
found
An unexpected error occurred: ant jar > /dev/null exited with 127
Deleting project...
]
创建一个cordova项目后,我尝试将android添加到平台,但像这样失败了。我的 PATH 中确实有 sdk 工具和平台工具,所以如果我在终端上键入 android,它会打开 sdk 管理器。
有关更多信息,我通过 sudo npm install -g cordova 安装了 cordova,并收到一条警告消息:
/usr/local/bin/cordova -> /usr/local/lib/node_modules/cordova/bin/cordova
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/couch-login
requires request@'~2.9.202' but will load
npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/request,
npm WARN unmet dependency which is version 2.21.0
任何类型的帮助将不胜感激。