After update of Android Studio to 2.1.2 I've been getting the following error too many times when i make a change.
com.android.ddmlib.AdbCommandRejectedException: device offline
Error while Installing APK
The problem is device was never connected and is not offline
If i unplug and re-plug the device it starts working fine again. This never happened in the previous version of AS.
Question: Is there a setting to be changed in AS for this to stop happening or it is a bug?
Invalidate your Studio cache, restart your device and pc will work. Sometimes the problem with port also, just try after changing the usb port of your pc also.
Re-enabling USB Debugging fixed the problem
Settings > Developer Options > Disable & Re-enable USB Debugging
You just need to restart ADB , no need to restart your PC or Phone
Try the below steps:
Go to the Android SDK platform-tools directory in the command prompt
Type adb kill-server
Then type adb start-server
Now try re-connecting ...
In my case I was debugging over wifi for a long time , then the ADB server needed to be refreshed to see the connected devices again
It Happened on Pixel device running Android 8.1.0 with Android Studio 3.0
Cheers!
Try Disabling and Re-Enabling * USB debugging. *
Under your developer option menu
This solved my issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With