前一段时间升级SDK Manager并装了几个低版本的API包后,再次在cmd中使用"adb"命令会出现如下错误
“adb不是内部或外部命令,也不是可运行的程序或批量文件。”
想了半天自己根本没动目录里的任何东西,网上查资料说是要找android-sdk/tool下的adb.exe
打开android-sdk/tool发现里面没有adb.exe程序,但是有一个文档名字是“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.
”
adb.exe迁移到了platform-tools/目录下了,我们只需要在环境变量Path下添加这个目录就可以了。
Android SDK做的还是挺贴心的哈~