4

I'm using Visual Studio Code to build my ionic3 app Now I want to debug my project but I am seeing this error: [

cordova-tools] Error processing “attach”: Error: Unable to find adb. Please ensure it is in your PATH and re-open Visual Studio Code

How can I fix this?

Patrick
  • 5,526
  • 14
  • 64
  • 101
Walid
  • 119
  • 1
  • 7

2 Answers2

6

I had the same problem on Windows, and I found the solution in Volodymyr's comment in Error:Unable to locate adb within SDK in Android Studio

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'

juanjaem
  • 61
  • 1
  • 3
1

adb.exe have to be available in PATH.

If it does not, you can install it by installing Android SDK Platform Tools. See here

For example on my computer, it look like:

C:\>adb version
Android Debug Bridge version 1.0.39
Revision 3db08f2c6889-android
Installed as C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe
  • thank you Patrick, my path of adb is : C:\Users\my user name\AppData\Local\Android\Sdk\platform-tools . Is that the problem ? – Walid Feb 12 '18 at 08:51
  • Not a problem at all. You have this path because you use another version of Android SDK than me. Maybe more recent than mine. Just had this path to your PATH variables in the configuration of your OS. – olivier cherrier Feb 12 '18 at 10:12