Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
515 views
in Technique[技术] by (71.8m points)

adb - Android Studio - Device is connected but 'offline'

This is quite a common question, but none of the solutions appear to work for me. First time asker, so apologies if I get the conventions wrong.

I am trying to connect my Galaxy S5 to my computer running Ubuntu 14.04 so I can do some android development. I have recently downloaded and installed Android Studio and the SDK and my device is detected when it's connected via USB but the device either appears as 'unauthorized' or 'offline'. I know I should be expecting the RSA key prompt but this never appears.

I have tried:

  • Checking debugging was enabled
  • Running adb kill-server and adb devices
  • Restarting (the device, developer options, the machine)
  • Simple unplugging and replugging the USB cable
  • Checking my adb version (it is 1.0.31)
  • Trying different USB ports
  • Revoking USB debugging authorizations
  • Toggling enabling ADB Integration from within Android Studio
  • Connecting as PTP device and MTP device

I have tried it on a separate machine that runs fedora and this works fine with no issues, the promopt appears right away. Therefore I imagine it is not the USB cable that is faulty.

Any ideas?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Try these:

  • Unplug and replug the USB cable.
  • If it still doesn't work, unplug the USB cable, disable then enable USB debugging in the device settings.
  • If the above two methods fail, reboot the device.
  • If rebooting the device also fails, reboot Android Studio too.
  • If reboot Android Studio still fail, try adb kill-server then adb start-server

Hope this helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...