本文介绍了如何在Mac上添加平台android(cordova)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照指示操​​作。



my .bash_profile:

  export PATH = / usr / local / bin:$ PATH 
export PATH = $ PATH :〜/ Development / adt-bundle-mac-x86_64-20140321 / sdk / platform-tools
export PATH = $ {PATH}:〜/ Development / adt-bundle-mac-x86_64-20140321 / sdk / tools:〜/ Development / adt-bundle-mac-x86_64-20140321 / sdk / tools
[[-s$ HOME / .rvm / scripts / rvm]]&&源$ HOME / .rvm / scripts / rvm#将RVM加载到shell会话*作为函数*
eval$(rbenv init - )
pre>

但仍然出错当我执行cordova平台添加android或离子平台android:

 code>错误:命令android失败。确保您已安装最新的Android SDK,并将android命令(在tools /文件夹内)添加到您的路径中。 

任何解决方案谢谢

解决方案

尝试在命令行中运行 android 如果未找到命令,则表示您的路径不正确。


i have follow the instructions.phonegab docs and How to add android to cordova platform? PATH error?

my .bash_profile:

export PATH=/usr/local/bin:$PATH
export PATH=$PATH:~/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools
export PATH=${PATH}:~/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools:~/Development/adt-bundle-mac-x86_64-20140321/sdk/tools
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
eval "$(rbenv init -)"

but still Error while i executing cordova platform add android or ionic platform 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.

Any Solutions? thank you

解决方案

try to run android in command line. if command is not found, it's mean that your path isn't right yet.

这篇关于如何在Mac上添加平台android(cordova)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 15:26