Error:Unable to locate adb within SDK in Android S

2019-01-04 11:46发布

Does anyone know what this means? I'm kind of noobish to Android. When I click the "run" button on my simulator I get this message.

Throwable: Unable to locate adb within SDK

I am running the latest version, 0.8.14.

EDIT: I'm using Android Studio

21条回答
太酷不给撩
2楼-- · 2019-01-04 11:58

The ADB is now located in the Android SDK platform-tools.

Check your [sdk directory]/platform-tools directory and if it does not exist, then open the SDK manager in the Android Studio (a button somewhere in the top menu, android logo with a down arrow), switch to SDK tools tab and and select/install the Android SDK Platform-tools.

Alternatively, you can try the standalone SDK Manager: Open the SDK manager and you should see a "Launch Standalone SDK manager" link somewhere at the bottom of the settings window. Click and open the standalone SDK manager, then install/update the

"Tools > Android SDK platform tools".

If the above does not solve the problem, try reinstalling the tools: open the "Standalone SDK manager" and uninstall the Android SDK platform-tools, delete the [your sdk directory]/platform-tools directory completely and install it again using the SDK manager.

Hope this helps!

查看更多
Anthone
3楼-- · 2019-01-04 12:00

I had this issue with Android Studio 3, the SDK manager somehow didn't include the full tools in platform-tools folder so I had to download it manually from:

https://developer.android.com/studio/releases/platform-tools.html

then extract it to my android/sdk/platform-tools/ folder

查看更多
Summer. ? 凉城
4楼-- · 2019-01-04 12:03

I get the error message, but adb.exe runs anyway (and debugging works fine), so its not a problem (apart from the error message being annoying). My best guess is that more than one process is trying to start the program at the same time.

查看更多
▲ chillily
5楼-- · 2019-01-04 12:05

It's worked for me (Android Studio 3.1.3):

1. Make sure that 'Android SDK Platform-Tools' is installed:

Tools > SDK Manager > SDK Tools (Tab)

2. Copy path of 'adb.exe' file. Usually here:

C:\Users\Username\AppData\Local\Android\Sdk\platform-tools

3. Open Enviroment Variables in Windows:

'Window + R' > and type 'SystemPropertiesAdvanced'> Enviroment Variables...

4. Create new system variable with name 'PATH' and value of your adb.exe path like that 'C:\Users\Username\AppData\Local\Android\Sdk\platform-tools'

查看更多
The star\"
6楼-- · 2019-01-04 12:07

I don't know probably is too late to answer to this question. But if someone is in my situation and struggling with this problem will useful.

Few antivirus programs detect adb.exe as a virus. You should take a look in the place where antivirus is putting your detected threats and restore it from there. For Avast Antivirus is inside of virus chest

Hope it will be useful for someone !

查看更多
Juvenile、少年°
7楼-- · 2019-01-04 12:09

yeah I have same experience

The ADB is now located in the platform-tools directory.

  1. korsosa said Check your [sdk directory]/platform-tools directory, if it exists. If not, then open the SDK manager in the Android Studio (a button somewhere in the top menu, android logo with a down arrow), and download&install the Tools > Android SDK Platform-tools.

  2. If you have platform-tools, you have check adb.exe file. In my case, that file was broken, so download that platform-tools again

查看更多
登录 后发表回答