尝试运行 calabash-android 命令时出现“找不到 Android SDK,请确保已安装”错误。我已经通过 brew 安装了 Android SDK。这是我的 .bash_profile 的内容:
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.2
PATH=$PATH:$ANDROID_HOME/tools
PATH=$PATH:$ANDROID_HOME/platform-tools
PATH=$PATH:$ANDROID_HOME/build-tools
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
PATH=$PATH:/usr/local/apache-ant-1.9.4/bin
PATH=$PATH:/usr/local/share/npm/bin
JAVA_HOME=/usr/libexec/java_home
export PATH
这是我的 $PATH:
echo $PATH
/Users/mchumak/.rvm/gems/ruby-2.1.1/bin:/Users/mchumak/.rvm/gems/ruby-2.1.1@global/bin:/Users/mchumak/.rvm/rubies/ruby-2.1.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Cellar/android-sdk/24.2/tools:/usr/local/Cellar/android-sdk/24.2/platform-tools:/usr/local/Cellar/android-sdk/24.2/build-tools:/Users/mchumak/.rvm/bin:/Users/mchumak/.rvm/bin:/opt/local/bin:/opt/local/sbin:/Users/mchumak/.rvm/bin:/usr/local/apache-ant-1.9.4/bin:/usr/local/share/npm/bin
“哪个机器人”产生:
/usr/local/bin/android
该特定文件的内容是:
#!/bin/bash
TOOL="/usr/local/Cellar/android-sdk/24.2/tools/android"
exec "$TOOL" "$@"
我可以从命令行运行 Android SDK Manager,它显示了正确的 SDK 路径(/usr/local/Cellar/android-sdk/24.2)。
我难住了。任何想法为什么 calabash-android 找不到 SDK?