First, make sure that the Android ADB can "talk to" your device.
- Open a Windows Command Prompt (cmd.exe)/Mac Terminal.
- Go to the folder (via
cd
) where ADB.exe is in, e.g, C:Androidandroid-sdkplatform-tools.
- Type
adb devices
If your device is listed (serial number is displayed), go to the second check. Otherwise, this means ADB currently can't talk to your device. There're many reasons which can cause the problem, try:
- In your device, turn on "USB Debugging Mode" in Settings -> Application -> Development.
- In your device, turn on "Allow installation of non-market Applications" in Settings -> Application -> Development.
- Restart your Windows/Mac.
- Restart the Android device.
- In Windows/Mac, reinstall device drivers.
Second, make sure you set the "Deployment target selection mode" to manual:
- In Eclipse Package Explorer view, right click your Project, select Run As -> Run Configurations...
- In Run Configurations dialog, under Android Application. If your app doesn't exist, double click Android Application to create a new configuration, give it a suitable name (e.g. your app). Make sure this configuration is selected.
- On the right area, for Android tab, make sure your project displayed under Project; for Target tab, select "Always prompt to select device" or "manual".
- Click "Apply" and close the Run Configurations dialog.
The next time when you Run your app, you should see your list of devices.
Your device still can't display? Ok. Third, make sure your "Project Build Target" Android version is supported in your Device.
- Check your device's Android version. In your device, select Settings->About Device.
- Check Android version of your project. Right click your project->Properties->Android->ProjectBuildTarget.
- Make sure that it's not newer than your device's version.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…