I would like to test my app on at least 2 Android emulators simultaneously. I can start 2 emulators but can't seem to find how to react-native run-android
my app on 2 emulators with ADB. If possible I would also like to be able to run a react-native log-android
on each one while testing my app.
Is there a way to do so ?
You can run multiple emulators at the same time simply by running your app again. When the AVD manager pops up, instead of selecting your already running emulator, click 'Launch Emulator' and select another emulator to launch. Thank you for the answer!
In order to run your react application on multiple emulators, just start 2 emulators as usual and then use the command react-native run-android
.
You can even specify any port number as react-native run-android --port 8084
if you want. Your app will start on both the emulators simultaneously. :)
Have a look here
You can only do it on different ports. Because one port, one listener :/
Solve:
react-native start --port 9988
./emulator -port 9988 -avd devicename1
react-native start --port 9999
./emulator -port 9999 -avd devicename2
Before running the emulator, You can write in the terminal and then run it:
function emulator { cd "$(dirname "$(which emulator)")" && ./emulator "$@"; }
First emulator is react .
emulator -port 9988 @react
react-native run-android ( automaticaly detect emulator )
Second emulator is r .
emulator -port 8081 @r
react-native run-android (automaticaly detect emulator )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With