0

I've been developing an Android app using Eclipse and the Android plug-in for Eclipse and all these days, I would just plug in my phone into the computer and hit Run and would see my app run on my Samsung Galaxy Phone. But now it shows me a window like the following and am unable to choose my phone as the device because under the "State" column it says "Offline" even when the phone is plugged into my computer. I can't even use the emulator because its painfully slow on my computer.

user1210233
  • 2,730
  • 5
  • 24
  • 31
  • Did you mean to include a screenshot? – Aleks G Jul 02 '12 at 10:37
  • 1
    Check on your phone that you have "unknown sources" and "usb debugging" enabled. – Aleks G Jul 02 '12 at 10:37
  • "USB Debugging" can be enabled (for most Android devices) by going into your main Settings > Applications > Development > USB Debugging. You must enabled this *before* you attach your device. – Jason L Jul 02 '12 at 15:12

3 Answers3

1

Refer this link

Android device chooser - My device seems offline

  • Restart adb by issuing 'adb kill-server' followed by 'adb start-server' at a cmd prompt
  • Disable and re-enable USB debugging on the phone
  • Rebooting the phone if it still doesn't work.

enter image description here

Community
  • 1
  • 1
Nirali
  • 13,571
  • 6
  • 40
  • 53
  • I'm sorry. I'm just getting started with Android programming and I am using Eclipse along with the plug-in. Could you please tell me how I can restart adb without going to command line. I am not sure at which cmd prompts I should issue the above commands. @mah – user1210233 Jul 02 '12 at 10:59
  • See i have update answer. You have to use command prompt and go to android sdk folder. – Nirali Jul 02 '12 at 11:03
  • If in one time it doesn't start. Do it 3 -4 times. Does it worked? Please accept answer if it worked for you – Nirali Jul 02 '12 at 11:41
  • I did it 6 times! Still doesn't work. On issuing 'adb kill-server' it says *server not running* and then I issued 'adb start-server'. I did this 6 times. I then switched off USB debugging in the phone. Switched off the phone. Switched it back on. Enabled USB debugging. When I try to run the app, Eclipse now gives me this error: – user1210233 Jul 02 '12 at 11:57
  • [2012-07-02 17:25:58 - Android Memo] ------------------------------ [2012-07-02 17:25:58 - Android Memo] Android Launch! [2012-07-02 17:25:58 - Android Memo] The connection to adb is down, and a severe error has occured. [2012-07-02 17:25:58 - Android Memo] You must restart adb and Eclipse. [2012-07-02 17:25:58 - Android Memo] Please ensure that adb is correctly located at 'C:\Users\Nikhil\Desktop\classes\android-sdk\platform-tools\adb.exe' and can be executed. – user1210233 Jul 02 '12 at 11:59
  • And now all of a sudden the app starts running!!! Thank you so much for your time and patience. Really appreciate it! – user1210233 Jul 02 '12 at 12:00
0

Sometimes Android devices appear "offline" (according to adb devices). I've generally had success fixing this by rebooting the device, though it won't hurt to also adb kill-server followed by adb start-server.

I've seen this happen with multiple unrelated devices, infrequently, and seemingly randomly (that is, seemingly unrelated to anything I had been doing).

mah
  • 39,056
  • 9
  • 76
  • 93
0

Reformatting the phone solved this problem for me. I don't know if that solved the problem but once I reformatted the phone, I was able to run the app on the phone.

user1210233
  • 2,730
  • 5
  • 24
  • 31