Android 未找到命令:从 adb 目录执行时出现 adb
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24480739/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Command not found: adb when executed from adb's directory
提问by agconti
I just installed android studio and and platform tools and I cant call adb
even though its clearly located in the same directory. I get this error:
我刚刚安装了 android studio 和平台工具,adb
即使它明显位于同一目录中,我也无法调用。我收到此错误:
zsh: command not found: adb
I'm new to the android SDK so this probably an easy fix. Any ideas?
我是 android SDK 的新手,所以这可能是一个简单的修复。有任何想法吗?
Example execution:
示例执行:
agconti-Inspiron-5520 :: android-studio/sdk/platform-tools ? adb 1 ?
zsh: command not found: adb
agconti-Inspiron-5520 :: android-studio/sdk/platform-tools ? ll 127 ?
total 3.2M
-rwxrwx--- 1 agconti agconti 1.3M Jun 21 21:09 adb
drwxrwx--- 2 agconti agconti 4.0K Jun 21 21:12 api
-rwxrwx--- 1 agconti agconti 47K Jun 21 21:09 dmtracedump
-rwxrwx--- 1 agconti agconti 220K Jun 21 21:09 etc1tool
-rwxrwx--- 1 agconti agconti 197K Jun 21 21:09 fastboot
-rwxrwx--- 1 agconti agconti 9.9K Jun 21 21:09 hprof-conv
-rw-rw---- 1 agconti agconti 704K Jun 21 21:12 NOTICE.txt
-rw-rw---- 1 agconti agconti 39 Jun 21 21:09 source.properties
-rwxrwx--- 1 agconti agconti 754K Jun 21 21:09 sqlite3
drwxrwx--- 2 agconti agconti 4.0K Jun 21 21:09 systrace
回答by Gabe Sechan
Use:
用:
./adb
Unless .
is in your path it won't be found. And for security, .
shouldn't be in your path.
除非.
在你的路径中,否则它不会被找到。为了安全起见,.
不应该在你的道路上。