5

I start my Genymotion then i do npm start on my react native project via VS Code . i got this message:

>Press a to open android device or Emulator
>Press q to display QrCode
 .
 .

so i pressed a but i got this error:

Error running adb: more than one device/emulator

how can i solve this? i tried adb devices to see my devices and i saw this list:

emulator-5562 host
emulator-5560 host
emulator-5558 host
192.168.X.X device

my OS is windows 10. i couldn't even start my react native hellow-world still

Edit: i turned of my system and in next day every thing worked on . why? i checked devices again by this command: adb devices this time the list includes just one device : 192.168.X.X device so we have to have only one device as emulator but!! how can i kill all devices just one in adb?

3
  • @mjsameri no i don't use it Nov 12, 2017 at 12:01
  • @mjsameri No i didn't hear about them ...no Nov 12, 2017 at 12:05
  • @mjsameri yes now when it worked on i knew its working with Expo.. Nov 13, 2017 at 5:39

9 Answers 9

17

This happened to me although I had just one Genymotion emulator running. The problem was I was charging my phone with my laptop, and I had USB debugging enabled. Disabling USB debugging in my phone fixed the problem.

2
  • 1
    Yes...This is exactly what solved the problem...either you turn off USB debugging or disconnect the usb cable connected to your mac
    – Frankrnz
    Aug 13, 2019 at 10:08
  • 1
    No need at all to kill your adb.exe process fellas. This one is the correct answer. +1 for correct info 👍🏼 Dec 2, 2019 at 13:02
9

Open your task manager and in the background processes finalize the adb process.

2

Stop all open devices,emulators. Go to Android Studio > Tools > AVD manager > and click the right most drop-down > click Stop. Stop them all devices. $ adb devices should only show one device attached. (specially when running on a real device and not a simulator) Close the AVD manager too. almost no setup needed.

1

Same error with Expo XDE for React Native apps.
Trying to deploy on test device while charging phone.
Solution: disabled debug usb on second phone solved the problem (as error log suggested)

1
  • @It works for me. my physical device is connected to my laptop and after disconnect my physical device everything works well.
    – MBehtemam
    Aug 6, 2018 at 8:05
1

In case somebody stumbles upon this question.. you can also use
react-native run-android --deviceId=<deviceId where you want to run your app>

2
  • You can know the Id by running adb devices. Right?
    – mayid
    Oct 11, 2019 at 11:46
  • @mayid absolutely Oct 12, 2019 at 12:57
1

If you are not sure what to do, then:

  1. Disconnect any phone which might be connected to your computer.

  2. Close all the Apps and restart your computer.

  3. After restart open just one emulator from android studio. If running on real device, connect just one device (and close the emulator).

The error is showing because bundler is detecting more than one device/emulator which are connected via ADB.

** Scan QR Code to run your app on multiple devices at the same time.

0

Open TaskManager search for adb.exe and close it go back to your console press a again and it will work

exp

0

If you're having trouble stopping individual emulators, adb kill-server quite reliably stops all emulators.

0

Similar issues were occurring for me using Flutter. I used both USB and adb connect IP:Port to connect my device. As a result, the same devices are connected in two ways. My issue was resolved when I performed adb kill-server, unplugged the device from the USB, and then connected solely over IP. Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.