错误:ANDROID_HOME 未设置且“android"未设置命令不在您的 PATH 中.您必须至少满足以下条件之一 [英] Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions

查看:19
本文介绍了错误:ANDROID_HOME 未设置且“android"未设置命令不在您的 PATH 中.您必须至少满足以下条件之一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 MAC OS X Yosemite 我已经完成了设置 android_home 的所有导出教程,但没有一个对我有用

I am MAC OS X Yosemite I have done all the export tutorial to set the android_home but non of it working for me

推荐答案

确保导出 ANDROID_HOME 并将 SDK 工具目录添加到 PATH 应该足以让您继续前进.

# First, we make sure we have a newline at the end of the .bash_profile
echo >> /Users/abdi/.bash_profile

# We set the ANDROID_HOME value in the .bash_profile
echo "export ANDROID_HOME=/Users/abdi/adt/sdk" >> /Users/abdi/.bash_profile

# We alter the PATH value a bit as well
echo "export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools" >> /Users/abdi/.bash_profile

# We then tell the terminal to update all the things
. /Users/abdi/.bash_profile

<小时>

使用 GUI(大部分)

您还可以使用 open -e/Users/abdi/.bash_profile 命令在 TextEdit 中打开 .bash_profile 文件.如果您收到一些关于丢失文件的错误,请尝试运行 touch/Users/abdi/.bash_profile 并重试打开命令.在打开的文件中,在末尾添加以下几行.


Using a GUI (mostly)

You can also open the .bash_profile file in TextEdit using the open -e /Users/abdi/.bash_profile command. If you get some errors about missing files, try running touch /Users/abdi/.bash_profile and retry the open command. In the file that opens, add the following lines at the end.

export ANDROID_HOME=/Users/abdi/adt/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

运行 <代码>./Users/abdi/.bash_profile 在终端版本之后应该让你完全设置.

Running . /Users/abdi/.bash_profile as in the terminal version after that should get you fully set up.

这篇关于错误:ANDROID_HOME 未设置且“android"未设置命令不在您的 PATH 中.您必须至少满足以下条件之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆