How to resolve "Warning: debug info can be unavailable. Please close other application using ADB: Restart ADB integration and try again"
Asked Answered
L

24

101

I am having a slight issue when trying to debug and android app via usb to external device. I keep getting the error "Warning: debug info can be unavailable. Please close other application using ADB: Monitor, DDMS, Eclipse Restart ADB integration and try again Waiting for process:"

I have tried stopping adb.exe in task manager , closing android studio and restarting , taking out the cable and putting it back and going to tools => android uncheck adb intergration then recheck it . All to no avail

Limon answered 3/5, 2016 at 11:56 Comment(2)
I am not using eclipse on my machine at allLimon
Back when I used eclipse, it happened for me all the time. the only solution for me was restarting computer, put cable in, start eclipse, in that exact order.Diarrhoea
L
147

This is a problem of ADB connections as sometimes ADB cache a dead connection on your real/virtual device and due to which the port is busy and u cannot connect to it.

The simplest solution to this is RESTART your ANDROID phone that's it.

Link answered 20/12, 2018 at 6:43 Comment(10)
Disconnecting the phone from the cable worked as well.Senzer
sud007 Not needed. May have worked for you but different people face this problem under different circumstances. Some phones stop their ports in use when cable is detached but not all.Link
I do not understand "not needed" as your forced opinion. However, different people have different problems is a correct one. And for the record, there is no specific problem hence, this is just a workaround and not a Solution.Senzer
sud007 not needed means no need to disconnect the cable if you work according the above way around. It will work for all phonesLink
i had my device connected over the wifi and adb tcpip 5555 < restarted the connection for me and it workedJostle
Device restart solution workded. Thanks @SakshamUre
Thanks, Bawa! I'm also debugging over wifi, and this is much nicer than restarting the phone or the IDE.Kaenel
I restarted my device and it did not workCongelation
Device restart is too much. Disable and re-enable USB debugging on the device is enoughHeadstone
@Senzer Thanks! I have two PC. One notebook was already connected to the Android phone by USB cable. When trying to connect the phone on another PC via WiFi, the warning appears. Finally unplugged cable works.Remy
M
60

What worked for me was to disable and re-enable USB debugging on the device.

Mandolin answered 12/2, 2018 at 7:5 Comment(4)
Yes it worked by turn it OFF and turn it ON back in Settings -> Developer Options -> USB DebuggingLupien
Tried this; did not workCongelation
yeaaaah!) @ShailendraMadda you are god for me!!)) exactly this helped! i struggled with this!! Before I made Clean, Invalidate caches..., restarted PC - and nothing! I helped me on emulators! I had this problem on 2 emulators. After fixing this on one of them the problem disappeared on the other one as well! Magic!)Maiduguri
@KirylIvanou Glad my comment helped you :)Lupien
N
19

Following steps resolved this issue to me:

  1. Disconnect the device.

  2. Restart android studio.

  3. Run the project.

Niche answered 13/2, 2018 at 15:24 Comment(2)
Even restarting system did not worked... but, this trick worked ;)Blondie
This worked. Step 2.1: connect your device while android studio restarts :)Sporangium
O
19

Simply go to your Android phone developer settings, disable USB debugging, delete all authorizations for USB debugging and turn the debugging on again.

Obligate answered 22/3, 2019 at 10:36 Comment(1)
Yes it worked by turn it OFF and turn it ON back in Settings -> Developer Options -> USB DebuggingLupien
F
18

The issue occurs when I open the Android Studio and IDEA together.

Restart the Android Studio does NOT fix the issue

Re-plugin the cable either does NOT fix the issue

Restart the Mac either does NOT fix the issue

Restart the ADB from terminal FIX the issue

adb kill-server 
adb start-server

In this way, you do not need to close the IDEA.

Updated: 2022-09-19

Restart the Android Studio does NOT fix the issue

Invalidate and Restart the Android Studio does NOT fix the issue

Re-plugin the cable either does NOT fix the issue

Restart the Mac either does NOT fix the issue

Restart the ADB from terminal either does NOT fix the issue

Restart the Android device fix the issue.

Fabrin answered 3/9, 2022 at 8:3 Comment(0)
A
17

First make sure you close any application use ADB , DDMS

like if you open Eclipse with android studio

Second restart your ADB from terminal

adb kill-server
adb start-server
Adage answered 3/5, 2016 at 12:1 Comment(6)
in my cmd and in my terminal I typed adb kill-server and I get 'adb' is not recognized as an internal or external command, operable program or batch file.Limon
@Limon in the terminal.Adage
@Limon if you run this two command then starting adb with no error.Adage
I get that same error in the terminal do you have any other suggestionsLimon
@Limon in /platform-tools try './adb kill-server' and './adb start-server'Grenville
@Limon You must add adb to your environment variables path Check online for how to add environment variable based on your operating systemResistance
U
15

Just run command adb usb with connected device and try to debug again.

Unreason answered 10/3, 2023 at 14:15 Comment(0)
S
13

This problem sometimes occur when Android Studio is opened with another IntelliJ Editor. Just close the other IntelliJ Editor.

Slacker answered 2/7, 2021 at 14:39 Comment(1)
After trying all other options, this was it. Closed IntelliJ IDEA CE and the problem was solved. Thanks!Chaste
C
9
  1. Open USB preferences in your device. Like the image below.

  2. Click another option. (eg:File Transfer)

  3. Click the no data transfer.

If it doesn't work,please try again.

The operations on the android devices are similar.

enter image description here

Conni answered 1/1, 2019 at 12:4 Comment(0)
S
6

this may happen when you created two instances of android studio, or else you are using same device in multiple ADB programs, so simply disconnect you device and then open your desired android studio instance and then connect again. now it will work fine.

i also use same method and every time it works.

Scottie answered 16/2, 2018 at 6:29 Comment(1)
You're right, I have this problem while running Android Studio Canary along side the stable version.Kilogrammeter
G
6

IntelliJ IDEA (Ultimate, probably also Community) comes with Android plugin. If IntelliJ is started and any project is open and has been compiled (even without any Android code-base) then IntelliJ (apparently) steals the adb-connection from Android Studio. Either close IntelliJ or disable the Android plugin in IntelliJ.

If IntelliJ is open with android plugin, rebooting phone, killing adb etc. are only sporadic and short-time fixes of the problem as IntelliJ steals the adb connection again.

Godhood answered 19/1, 2022 at 13:30 Comment(1)
That's brilliant of you to discover this!! This was my problem! Very helpful!Geomorphology
C
4

I resolved this issue by changing the Use USB for settings Go to setting select transfer settings in my case MIDI was selected.

Crossstitch answered 20/4, 2022 at 8:43 Comment(1)
Worked for Android 12 by changing USB for File Transfer.Glutamate
S
3

In Android Studio Version Electric Eel, I get this error. What worked for me:

  1. enter command in terminal: adb kill-server

  2. don't run any other commands

  3. click on "Attach Debugger to Android Process button"

    attach debugger icon

  4. wait for "Waiting for ADB" dialog to finish

  5. done! (but sometimes i have to repeat above steps 2-3 times)


  1. if the issue still persists, unplug all devices and terminate all emulators

  2. plug devices back in, and turn on emulators from the "cold boot now" option

    enter image description here

  3. and then try again from the beginning (adb kill-server)

Silvasilvain answered 15/3, 2023 at 17:28 Comment(1)
Cold boot helped me with Emulator debugPronghorn
V
2

Go to Airplane mode ON and OFF , After that everything back to normal.

Vallombrosa answered 24/1, 2022 at 7:16 Comment(0)
C
2

There are few ways to recover adb debugging without restarting android device or machine,

  1. try to restart adb connection (adb kill-server && start-server)
  2. try to restart your modem device (Ethernet or Wifi)
  3. try Disable and Enable again Developer option in your android device

When problem still not resolved, consider restarting your device

Commensurable answered 24/5, 2023 at 17:56 Comment(0)
L
1

In my case, I had my device connected both via WiFi (with adb tcpip) and USB cable. Disconnecting the USB cable solved the issue.

Lenardlenci answered 23/9, 2019 at 22:21 Comment(0)
A
1

Quite awkward issue, I think none of the solutions mentioned above worked for me. Ultimately, I had to invalidate caches and restart.

File -> Invalidate caches... -> Select both options -> Invalidate and restart

Apriorism answered 23/1, 2023 at 13:43 Comment(0)
F
0

For me was Eclipse using DDMS and conflicting with Android Studio, I wasn't using, so I just uninstall it.

If is your case, go to Eclipse > Help > About Eclipse IDE > Installation Details > Select DDMS and Uninstall..

Flatcar answered 3/3, 2021 at 17:37 Comment(0)
H
0

At times ADB caches a dead connection on device(real / virtual) due to which the port is busy and it is unable to establish a connection.

You can try different ways:

  1. You can kill and restart the server:

    adb kill-server adb start-server

2). Try disconnecting the device(phone) and reconnecting it.

3). Restart your device (phone).

Hedy answered 18/5, 2021 at 13:24 Comment(0)
P
0

Slightly different answer, but I'm including it for completeness.

For me Android Studio had frozen as well with the spinning beach ball of death.

  1. I rebooted the emulator (by having it emulate a power-off/restart cycle)
  2. Killed Android Studio (on a Mac by using esc)
  3. Restarted Android Studio.

After that everything was back to normal.

Prentiss answered 20/8, 2021 at 1:41 Comment(0)
D
0

if you open two Android Studio at the same time (android studio preview),Will be like this

Draftsman answered 26/11, 2021 at 3:20 Comment(0)
F
0

For me, it works when rebooting the macOS.

Fabrin answered 13/3, 2023 at 10:9 Comment(0)
R
0

adb kill-server

adb start-server

Reconnect your device

Rebluid the app on it

Repulse answered 27/3 at 13:41 Comment(0)
L
-1

A possible temporary work around that may work prove useful for progress sake when intending to debug is to run the app in android studio , then immediately click on run => attach to debugger

Limon answered 4/5, 2016 at 14:34 Comment(1)
The scenario you describe is where I encountered this problem. (It wasn't me who downvoted btw)Dally

© 2022 - 2024 — McMap. All rights reserved.