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.
First, you are not connecting device with emulator. What you want is eclipse to identify your device and use it for development.
Everything about using devices for android development is given in official documentation.
Have you enabled USB debugging in your device?? You can find it in your device
Goto -> Setting -> Application -> Development -> USB Debugging
Enable it and try.
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.
You have to put the phone in 'debug' mode - I don't have the instructions handy (but you can search here or on the android site for the info you need).
Also check for THIS.
Try right clicking the project -->Run As --> Run Configurations then select target and choose always prompt On your device turn on debug mode Now try running project