简体   繁体   English

在Mac OSX 10.9.3上将android添加为平台Cordova 3.5.0时出错

[英]Error adding android as a platform Cordova 3.5.0 on Mac OSX 10.9.3

I have been at this for 2 days now. 我已经在这里呆了两天了。 I have added iOS as a platform with no issue. 我已将iOS添加为平台,没有问题。 However adding Android as a platform is giving me this error: 但是,将Android添加为平台会给我这个错误:

"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."

I have added read tonnes of similar issues and added to my path like so: 我添加了许多类似的问题,并添加到我的路径中,如下所示:

export ANDROID_HOME=/Users/MYUSERNAME/SDKs/Android_SDK/
export PATH=/Users/MYUSERNAME/SDKs/Android_SDK/platform-tools:/Users/MYUSERNAME/Android_SDK/tools:$PATH

Yet it still throws up the same error. 但是它仍然引发相同的错误。 I used echo $PATH to make sure the path had updated and it's all as it should be according to other forums. 我使用echo $ PATH来确保路径已更新,这与其他论坛所确定的一样。 Any ideas on why this isn't working for me? 有什么想法为什么对我不起作用? I'm losing my mind at this point! 我现在不介意!

Managed to figure it out. 设法弄清楚了。 When specifying your path through "export PATH=" apparently it matter which one you check first. 通过“ export PATH =“指定路径时,首先检查哪个路径显然很重要。 So what I had was 所以我曾经是

export PATH=/Users/MYUSERNAME/SDKs/Android_SDK/platform-tools:/Users/MYUSERNAME/Android_SDK/tools

what it should have been was 应该是

export PATH=/Users/MYUSERNAME/SDKs/Android_SDK/tools:/Users/MYUSERNAME/Android_SDK/platform-tools

platform is now added and seems to be working fine. 平台现在已添加,并且似乎工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM