问题
I want to test my App in a Samsung Galaxy S4, i've checked "unknown sources" and enabled the developer menu and checked "Debug mode". But It is displayed offline
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb.exe devices
List of devices attached
XXXXXXXX offline
any ideas why?
回答1:
Check that you have latest Android SDK tools. After installing latest SDK tools, check your phone: you need to confirm that you allow debugging from your computer.
回答2:
For me, it wasn't until I updated my computer's drivers with Samsung's official driver that I could get my S4 to be recognized in Eclipse (also, don't forget to enable Debugging mode)
The driver url: http://www.samsung.com/us/support/owners/product/SGH-I747MBBATT
回答3:
I just ran my first app - hel,lo world - on my Galaxy s4 Active.
I developed it yesterday and it would run on the emulator but even though my phone was connected to the computer through USB and I could transfer files and also kies air worked Eclipse could not see the phone.
Today I downloaded and installed the latest driver from Samsung for the Galaxy s4 Active, SAMSUNG_USB_Driver_for_Mobile_Phones_v1.5.23.0-retail, on the computer. I opened the app in Eclipse and hit RUN and and the phone was now visible. I chose the phone and the app transferred to the phone and would run on the phone.
As noted, the phone was visible to the computer and apparently was working in every way, except development, before I downloaded and installed the new driver. I've only had my phone about a month so I'm not sure why the original driver would not "develop".
回答4:
The reason for this behaviour is device is unauthorised for USB debugging. Ideally a pop up should appear on the device asking to provide permission for USB debugging. Select Allow always for this computer and click OK. This will solve the offline issue.
If the pop up does not come up when you plug the device to computer. Open adb command prompt and run
adb usb in command prompt(with device connected to computer through USB) this will reboot android adb usb listner which will force the pop up to come on the device.
回答5:
The solution is:
1st Make sure that your device is not connected in your computer
2nd Disable USB Debugging mode in your phone
3rd Connect your device with USB cable to your computer
4th enable usb debugging mode (should have already pressed the "about" phone 7 times)
5th Message Dialog about fingerprint of your computer will be displayed, just press ok
Prerequisites:
-installed complete adt environment with downloaded sdks,
-installed samsung usb driver
回答6:
On Windows 7 for Samsung Galaxy S4 the only thing that helped me was to install KIES 3 and to use Tools->Reinstall device driver. I tried to install only usb driver given as link here http://www.teamandroid.com/download-android-usb-drivers/ but it was not enough.
My current working driver version is 2.9.319.511. Android version is 4.4.2. Now I see the device in Android Developer Tools, KIES 3 and adb devices.
Additional notes: I found several links on Samsung site for download of different versions of the device driver - it seems they don't keep all links up to date. I also had another issue - I downloaded KIES 3, installed it and on start of the application I immediately received a popup that an update is available and if I want to update KIES 3 I have to uninstall the current installation. So I also chose to uninstall KIES 3 and install the last update. Only then I reinstalled the device driver.
来源:https://stackoverflow.com/questions/16799929/samsung-galaxy-s4-in-eclipse-adt