我是科尔多瓦的新手。 我按照this tutorial创建了一个android项目。但我在MAC上面临以下错误:
错误:错误:命令“android”失败。确保安装了最新的Android SDK,并在您的路径中添加“android”命令(在工具/文件夹中)。
我重复更新了Android SDK并编辑了PATH ---
export PATH = / usr / bin:/ bin:/ usr / sbin:/ sbin:/ usr / local / bin:/ abhisheksmacbook / adt-bundle / sdk / platform-tools:/ abhisheksmacbook / adt-bundle / sdk /工具/的机器人
仍然存在错误.. :( :( 有什么帮助吗?
Creating android project...
Error: An error occured during creation of android sub-project.
/Users/abhisheksmacbook/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
throw e;
^
Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.
at /Users/abhisheksmacbook/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:85:29
at _rejected (/Users/abhisheksmacbook/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:808:24)
at /Users/abhisheksmacbook/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:834:30
at Promise.when (/Users/abhisheksmacbook/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:1079:31)
at Promise.promise.promiseDispatch (/Users/abhisheksmacbook/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:752:41)
at /Users/abhisheksmacbook/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:574:44
at flush (/Users/abhisheksmacbook/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
at /usr/local/lib/node_modules/cordova/src/platform.js:282:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
答案 0 :(得分:0)
在Mac上:在~/.bash_profile
中编辑PATH变量后,运行source ~/.bash_profile
并关闭所有终端窗口。
再次打开终端,创建/构建android平台工作正常。