简体   繁体   English

安装 Android Studio 后找不到 adb.exe

[英]adb.exe not found after installing Android Studio

I installed Android Studio 1.2.1.1 and also created virtual device.我安装了 Android Studio 1.2.1.1 并创建了虚拟设备。 I am trying to install one app (APK file) through command line but I could not find adb.exe file on my machine.我正在尝试通过命令行安装一个应用程序(APK 文件),但在我的机器上找不到adb.exe文件。 Please help where should I look for adb.exe file on the machine.请帮助我应该在哪里寻找机器上的adb.exe文件。

The adb.exe file will be located at your Android SDK folder, inside platform-tools adb.exe 文件将位于您的 Android SDK 文件夹中,在 platform-tools 内

...\android-sdk-path\platform-tools\adb.exe

The default location where Android SDK is installed is: Android SDK 的默认安装位置是:

C:\Users\<insert username here>\AppData\Local\Android\sdk\

So adb will be located at:所以 adb 将位于:

C:\Users\<insert username here>\AppData\Local\Android\sdk\platform-tools\adb.exe

To access it on a command line, open cmd.exe and type:要在命令行上访问它,请打开 cmd.exe 并键入:

cd C:\Users\<insert username here>\AppData\Local\Android\sdk\platform-tools\

and then your normal command然后你的正常命令

adb <insert parameters here>

May be adb.exe file is missing form your computer.可能是您的计算机缺少 adb.exe 文件。 Try deleting platform-tools folder and re-download it from SDKManager.尝试删除 platform-tools 文件夹并从 SDKManager 重新下载它。

Mac OS El Capitan 位于 /Users/[username]/depot_tools/src/chrome/browser/devtools/device

In my case, adb.exe got deleted after Android Studio update.就我而言,adb.exe 在 Android Studio 更新后被删除。 I copied all the contents under platform-tools to another directory, deleted all the contents under platform-tools and installed platform-tools from Android SDK Manager.我将platform-tools下的所有内容复制到另一个目录,删除platform-tools下的所有内容,然后从Android SDK Manager安装platform-tools。

Make sure in Android Studio, under System Settings > Andorid SDK > tab called SDK Tools, you have checked this option:确保在 Android Studio 中,在系统设置 > Andorid SDK > 名为 SDK 工具的选项卡下,您已选中此选项:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM