zoukankan      html  css  js  c++  java
  • Androidadb不是内部或外部命令,也不是可运行的程序或批处理文件

    '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了。

  • 相关阅读:
    安装Apache提示APR not found的解决办法
    使用jQuery和CSS3实现一个数字时钟
    nodejs iconfont处理
    ios html5 长按复制文本
    Weex 开发入门
    Nginx比SRS做得好的地方
    NodeJs mysql 开启事务
    NodeJs使用Mysql模块实现事务处理
    centos7之系统优化方案
    CentOS 7 网络优化(升级内核、开启 BBR)
  • 原文地址:https://www.cnblogs.com/xuewater/p/2596875.html
Copyright © 2011-2022 走看看