How to connect the device to Eclipse?

2020-01-28 08:44发布

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.

13条回答
狗以群分
2楼-- · 2020-01-28 09:31

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.

查看更多
Lonely孤独者°
3楼-- · 2020-01-28 09:37

Have you enabled USB debugging in your device?? You can find it in your device

Settings -> Developer Options -> USB Debugging.
查看更多
beautiful°
4楼-- · 2020-01-28 09:44

Goto -> Setting -> Application -> Development -> USB Debugging

Enable it and try.

查看更多
Summer. ? 凉城
5楼-- · 2020-01-28 09:45

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.

  1. 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.

  2. 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

  1. Make sure you don't have an Android Virtual Device running in the background.

  2. 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.

  3. 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.

  4. 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.

  5. 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

  1. 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.

  2. 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.

查看更多
够拽才男人
6楼-- · 2020-01-28 09:45

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.

查看更多
啃猪蹄的小仙女
7楼-- · 2020-01-28 09:45

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

查看更多
登录 后发表回答