试图添加亚行PATH变量OSX

编程入门 行业动态 更新时间:2024-10-26 03:22:26
本文介绍了试图添加亚行PATH变量OSX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想开发Android和我想亚行添加到我的道路,这样我才能真正轻松地启动它。我以前由出于某种原因亚行不希望被发现添加的目录。这是非常令人沮丧。之前,任何人都有这个问题?

我创建了一个.profile文件中,并增加了以下吧。

导出路径= $ {PATH}:/用户/西蒙/利布斯/ Android的SDK-mac_x86 /平台工具/ 出口PATH = $ {PATH}:/用户/西蒙/利布斯/ Android的SDK-mac_x86 /工具

当我检查我的环境路径我看到以下内容:

/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?这将跳过路径变量完全,仅会在当前目录下的亚行。尝试运行亚行代替。

编辑:你的路径看起来是错误的。你说你

/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

本文发布于:2023-05-31 10:07:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/389588.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:变量   PATH   OSX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!