Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

more than one device/emulator react native Error in react native start

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?

like image 280
Iman Salehi Avatar asked Nov 12 '17 11:11

Iman Salehi


3 Answers

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.

like image 178
romin21 Avatar answered Oct 02 '22 09:10

romin21


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

like image 21
Ed_ Avatar answered Oct 02 '22 10:10

Ed_


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.

like image 31
Danystatic Avatar answered Oct 02 '22 09:10

Danystatic