I have been facing issue for sometime now. I use ubuntu for development but now the issue I face – Whenever I run adb commands on terminal, Android Studio disconnects weird though I can install the apps via run but logcat, layout inspector which I use frequently would show device as offline.
The issue can be resolved if I reopen Android Studio but it’s kinda hindering my flow of development.
Has anyone faced something similar
2
Answers
It sounds like you are experiencing a conflict between the adb instance used by the terminal and one used by Android Studio.
This is a known issue and can be quite frustrating.
Here are a few potential solutions to try.
Sometimes, simply restarting adb server can resolve the issue.
If you have multiple instance of adb running, they might conflict with each other.
Sometimes, simply disabling and re-enabling USB debugging on your device can resolve the issue.
Make sure Android Studio and your terminal are using the same adb binary.
Sometimes, different versions of adb can cause conflicts.
Sometimes updating can resolve underlying issues.
Occasionally, issues can arise from faulty USB cables or ports. Try using a different USB cable or port to see if the problem persists.
You can also try using adb over WiFi to avoid USB-related issues.
Ensure that Android Studio is configured correctly to use the same adb instance as your terminal.
By following these steps, you should be able to identify and resolve the issue causing adb disconnections between your terminal and Android Studio.
If you need more information, please send me a mail.
I wish my answer will help you.
Find how many
adb
you have installed (it may take some time):compare their version and check which one is used by your shell
and make your shell and AS use the same.