第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > 'adb' 不是内部或外部命令 也不是可运行的程序或批处理文件。

'adb' 不是内部或外部命令 也不是可运行的程序或批处理文件。

时间:2023-06-18 22:45:28

相关推荐

'adb' 不是内部或外部命令 也不是可运行的程序或批处理文件。

'adb' 不是内部或外部命令,也不是可运行的程序或批处理文件。

在座android开发中我们都离不开使用adb来操作一些东西,但是当我们在命令行中使用adb的时候,有时会出现'adb' 不是内部或外部命令,也不是可运行的程序或批处理文件。这样的提示,这是我们就需要要做一些处理了。

错误的原因主要是找不到adb.exe文件,在最初的android sdk中adb.exe是位于sdk目录下的tools文件夹下,因为我们只要在系统环境变量PATH中加入sdk\tools就可以了,但是后来的android sdk将adb.exe移动到platform-tools下。因为在tools中有一个文本提示adb_has_moved.txt,其内容为

The adb tool has moved to platform-tools/

If you don't see this directory in your SDK,

launch the SDK and AVD Manager (execute the android tool)

and install "Android SDK Platform-tools"

Please also update your PATH environment variable to

include the platform-tools/ directory, so you can

execute adb from any location.

因此我们这里的解决方法有两种,一种是在命令行中切换到platform-tools,然后指定adb,当然这种方式很麻烦,因为每次都要切换。第二种方式就是将platform_tools放到环境变量PATH中,这样就可以可以在任何地方都可以使用adb了。

Last Modified:-10-23

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。