more than one device/emulator react native Error in react native start
Asked Answered
J

10

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?

Jesse answered 12/11, 2017 at 11:52 Comment(3)
@mjsameri no i don't use itJesse
@mjsameri No i didn't hear about them ...noJesse
@mjsameri yes now when it worked on i knew its working with Expo..Jesse
A
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.

Antisthenes answered 19/9, 2018 at 12:40 Comment(2)
Yes...This is exactly what solved the problem...either you turn off USB debugging or disconnect the usb cable connected to your macSignificancy
No need at all to kill your adb.exe process fellas. This one is the correct answer. +1 for correct info 👍🏼By
R
9

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

Raquelraquela answered 29/6, 2018 at 14:49 Comment(0)
F
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.

Feeney answered 17/2, 2018 at 6:45 Comment(0)
B
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)

Berkeleianism answered 28/6, 2018 at 13:6 Comment(1)
@It works for me. my physical device is connected to my laptop and after disconnect my physical device everything works well.Silkweed
O
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>

Outgeneral answered 2/10, 2019 at 11:31 Comment(2)
You can know the Id by running adb devices. Right?Manado
@Manado absolutelyOutgeneral
R
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.

Reseat answered 24/3, 2020 at 6:32 Comment(0)
B
0

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

exp

Baal answered 29/3, 2019 at 3:39 Comment(0)
A
0

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

Anastassia answered 13/11, 2020 at 10:42 Comment(0)
P
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.

Pantheas answered 28/10, 2023 at 5:0 Comment(0)
K
0

going back to the classic ui fixed the problem for me. it is dumb that it was working yesterday, i was able to connect two physical devices but today it is showing this error and when i go back to the classic ui from the latest it worked.

Kaiserslautern answered 27/6 at 7:32 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Jap

© 2022 - 2024 — McMap. All rights reserved.