‘adb’ 不是內部或外部命令,也不是可啟動並執行程式或批次檔。

來源:互聯網
上載者:User

'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:2011-10-23

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.