How to connect the device to Eclipse?
I am not able to resolve this simple issue.
I am trying to connect my device to Eclipse via USB cable.
On my PC, I have installed Eclipse and the Android SDK and running the program on the emulator is working fine.
I have downloaded and installed Samsung Kies on my PC. It shows my device if connected via USB to the PC.
But I dont know how to connect the device with the emulator.
Connect means, I want to run the Eclipse code on my device instead of emulator. I am using Samsung Galaxy Ace GT-S5830i
. Please help me out to resolve this issue.
Solution 1:
Comment is lack of formatting so i add an answer.
-
Check if your computer had your phone driver. I assume that your use
Windows
. OpenDevice Manager
At a command prompt, in the Start Search box, or in the Run box, type the following command:
mmc devmgmt.msc
. Other ways : check link
If you find your phone name or
ADB Interface
so you got driver. Try to restartDDMS
or restart yourEclipse
. If you don't find your device or see something
Other device with yellow question mark
so try to install driver by browsing on your phone toSettings
-Developer Options
-Enable developer option
-Enable USB debugging
-Plug your phone to computer
. Windows will ask you to install driver.
3, Update Google USB driver in Android SDK Manager (in Eclipse) or search Samsung Galaxy Ace GT-S5830i driver
4.Some weird case i got on some device.
- Nexus S: disable Developer option. Restart phone. Enable again. Windows ask to install driver or you will see it in
Eclipse
. - HTC phone or Samsung : change
Connectivity Option
on phone toCharge only
(Swipe status bar. Check notifications displayed). Some phone set it to some kind of Sync data so Windows can not recognize device.
Solution 2:
I think your emulator is in Automatic. You can change that to Manual.
Try this,
Step 1
Go to Run Configuration
You can see three Columns Android,Target and Common.
Step2
Select the Target
Step 3
Choose Always prompt to pick device.Click Ok
Step 4
Now run your project you should see the emulator and your device. Select your device and click ok.
Hope it helps.
Solution 3:
Source.
Troubleshooting
This all sounds very straightforward, but there are countless quirks and hard-to-diagnose problems that can make connecting a device much more difficult than it sounds. In this section, we'll run through a checklist of things to try when your device isn't registering.
Check that USB Debugging is enabled. This setting can inadvertently (and perhaps even automatically) change when you plug/unplug your device from your machine, or when you reboot your phone.
Check your device while it's connected to your machine. Is it asking you to choose between different modes? Some phones have a 'charge only' mode that can prevent Eclipse from recognizing the device.
Choose a connection type
Make sure you don't have an Android Virtual Device running in the background.
Could there be a problem with the USB cable? If you have a spare cable to hand, plug it in to rule out a fault with the cable itself.
Double-check you're running the correct driver. Even if you are, some devices have all the required software pre-installed (for example, HTC Sync) and downloading drivers from another location can muddy the waters. If this might be the case with your device, try uninstalling the driver from your machine and reinstalling the software from your device's memory.
Does the driver require supporting software? Samsung Kies on Windows requires .Net Framework 3.5 SP1 or above, for example. This is usually installed along with the driver, but there's no guarantee.
Running the Android Debug Monitor tool (monitor.bat) has been known to kickstart Eclipse into recognizing a new device. Connect your device, locate monitor.bat (android-sdks/tools/monitor.bat) and double-click to open. This will open the Android Debug Monitor, a stand-alone debugging tool that lists connected devices.
Android Debug Monitor
A running adb.exe process can interfere with the connection. Close Eclipse, and open the Task Manager by pressing CTRL, Shift and Esc. Find the adb.exe process and kill it. Launch Eclipse and try again.
Check that your 'Project Build Target' is compatible with the Android version on your device. You can check what version of Android your device is running by opening 'Settings' and selecting 'About Phone,' followed by the 'Software information' option if available. If you need a reminder of your project's build target, ensure the project is selected in Eclipse's 'Package Explorer,' open the 'Project' menu and select 'Properties.' If the 'Android' tab isn't selected by default, open it and the Build Target will be displayed.