开发者

Device keeps losing connection regularly when connected to Mac Mini

开发者 https://www.devze.com 2023-03-22 05:57 出处:网络
I am trying to develop android apps on a MAC Mini and have installed all the required software like android SDK, eclipse and ADT.

I am trying to develop android apps on a MAC Mini and have installed all the required software like android SDK, eclipse and ADT. Everything works well so far except for one thing. I am connecting a Google Nexus phone via the USB and i have put the phone in the USB debugging mode and also have checked the option that the screen remain on while connected开发者_StackOverflow via USB.

But for some reason, I keep losing the connection when the device is connected at a regular interval. For ex: every 3 minutes or so. I know that it's losing connection because when I run

adb devices

after 3 minutes or so, i see no devices in the list of devices. Any workaround for this or am i not doing some set up steps correctly?

Thanks.


I run into this issue as well sometimes and for me it is usually a bad port on my laptop, when I use another port than it works fine, if available try different usb ports on your computer. Also the usb cord you are using may be faulty as well, if you have access to another cord I would try that and see if it doesn't help.


I'm having the same issue on a MacBook Air and haven't found a fix. However I have an easier workaround than physically disconnecting/reconnecting the cable back and forth.

Swipe from top to bottom to show the notifications, then click on "Tap for more USB options".

Device keeps losing connection regularly when connected to Mac Mini

Then select either MTP or PTP. The device should be reconnecting after switching between MTP and PTP.

Device keeps losing connection regularly when connected to Mac Mini


I run into this issue as well and I've found that closing all windows that are accessing the device will resolve this issue. For example a chrome:inspect window or file browser that is accessing the device.

Sometimes I have to issue adb kill-server then adb devices after closing the windows.


i tried all the possible things which worked temporarily : 1. reset the adb 2.physically disconnected the usb wire and connected again 3.changed the usb wire and used another usb port of my laptop 4.restarted my device and mac but had to face the problem again and again . reading the above from @bwags i checked and realised that the chrome inspection window was open, after i closed it the problem resolved


Ran into the same issue in 2022.

Go to your phone, System->Developer Options check all reasonable settings available.

"wait for debugger to attach" this one helped mine.

also, select your app to be the one tested, there's an options for that. quite silly.

it will ask for debugger to be attached.

M1 mac air machine with android studio Chipmonk

0

精彩评论

暂无评论...
验证码 换一张
取 消