1

When I am trying to install the apk I am getting this error.

Failed to install Sample.apk on device 'S5570f3a60af0': adb rejected install command with: more than one device
[2014-03-07 15:23:51 - Sample] com.android.ddmlib.AdbCommandRejectedException: more than one device
[2014-03-07 15:23:51 - Sample] Launch canceled!

I tried restarting the system and device, cleaning the project but still unable to solve this issue. Please help. Thanks in advance.

Meghs
  • 269
  • 1
  • 5
  • 20
  • Remove the current application from your device and then intall .apk file. – Lucifer Mar 07 '14 at 09:58
  • I'd start `adb` manually with command: `adb devices`. see [this SO link](http://stackoverflow.com/questions/14654718) for example. – Sigi Mar 07 '14 at 10:35
  • You have too many devices connected to your machine. You should target only one machine. – JoxTraex Oct 04 '17 at 06:19

4 Answers4

0

This generally happens when you move from one computer to another computer and you try to install same application from different computer.

Since the application is already there in the device, hence older version of eclipse is not allowing you to directly install the application file.

If you have Eclipse Juno version then it directly allows to install the application even if you have previous version of your application in the device.

For right you can solve this error by manually removing application from the device and then re-run the project.

user2060383
  • 979
  • 1
  • 14
  • 32
0

Because you are probably using another computer for deployment, you should try removing the application via the settings menu on the physical device (or the emulator).

Edit: In the log, you can see that ADB throws you the error that there are more then one devices attached. Try to see if you can resolve that problem be removing usb cables.

Laurens
  • 121
  • 1
  • 12
0

I've seen corrupted .apks that won't load on a device, with weird IOExceptions. Following these steps in Eclipse seems to prevent the problems I've seen:

Make sure that Project -> Build Automatically is turned off (that is, unchecked) Project -> Clean..., select "Clean All Projects", make sure the "Start a Build Automatically" checkbox is unchecked, and click OK. Use File -> Export -> Android -> Export Android Application to create the APK. Hope it helps

0

I think you have more than one device connected in the same network or it is open.Use the following commands

First check the devices that are attached by using the below command

$ adb devices

This lists the number of devices attached will be shown like this

017296d5904c device
192.168.56.101:5555 device

Suppose 017296d5904c is your device then run this command in cmd

$ adb -s 017296d5904c shell pm list packages

-s: to make command to specific device

For example check this out http://codetheory.in/execute-adb-commands-query-particular-android-device-emulator/

Sharath kumar
  • 4,064
  • 1
  • 14
  • 20