试图添加亚行PATH变量OSX [英] Trying to add adb to PATH variable OSX
问题描述
我想开发Android和我想亚行添加到我的道路,这样我才能真正轻松地启动它。我以前由出于某种原因亚行不希望被发现添加的目录。这是非常令人沮丧。之前,任何人都有这个问题?
我创建了一个.profile文件中,并增加了以下吧。
导出路径= $ {PATH}:/用户/西蒙/利布斯/ Android的SDK-mac_x86 /平台工具/
出口PATH = $ {PATH}:/用户/西蒙/利布斯/ Android的SDK-mac_x86 /工具
当我检查我的环境路径我看到以下内容:
<$p$p><$c$c>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Libs/android-sdk-mac_x86/tools:/Libs/android-sdk-mac_x86/platform-tools
所以,我知道,它被添加到我的PATH变量。现在,当我尝试运行ADB我得到它没有找到。
-bash:./adb:没有这样的文件或目录
这是非常非常令人沮丧的。难道是有权限的问题?有没有人有这个问题,OSX和Android?
为什么你想运行./adb?这将跳过路径变量完全,仅会在当前目录下的亚行。尝试运行亚行代替。
编辑:你的路径看起来是错误的。你说你
<$p$p><$c$c>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Libs/android-sdk-mac_x86/tools:/Libs/android-sdk-mac_x86/platform-tools您错过了/用户/西蒙组成部分。
另外请注意,如果您同时.profile文件和文件的.bash_profile,只有后者得到执行。
I am trying to develop for android and I want to add the ADB to my path so that I can launch it really easily. I have added directories before by for some reason ADB does not want to be found. This is very frustrating. Has anyone else had this problem before?
I created a file .profile and added the following to it.
export PATH = ${PATH}:/Users/simon/Libs/android-sdk-mac_x86/platform-tools/
export PATH = ${PATH}:/Users/simon/Libs/android-sdk-mac_x86/tools
When I check my environment path I see the following:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Libs/android-sdk-mac_x86/tools:/Libs/android-sdk-mac_x86/platform-tools
So I know that it is added to my PATH variable. Now when I try to run ADB I get that it is not found.
-bash: ./adb: No such file or directory
This is very very frustrating. Could it be a problem with permissions? Has anyone had this problem with OSX and Android?
Why are you trying to run "./adb"? That skips the path variable entirely and only looks for "adb" in the current directory. Try running "adb" instead.
Edit: your path looks wrong. You say you get
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Libs/android-sdk-mac_x86/tools:/Libs/android-sdk-mac_x86/platform-tools
You're missing the /Users/simon part.
Also note that if you have both .profile and .bash_profile files, only the latter gets executed.
这篇关于试图添加亚行PATH变量OSX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!