react-native run-android with port and device option always creates release build

Viewed 311

I am trying to run two react-native apps on two separate emulators by following these instructions. I run the following command:

npx react-native run-android --port 8081 --deviceId emulator-5556

However, instead of generating a debug build, the system tries to create a release build. Interestingly, if I run npx react-native run-androidwithout any extra options, I get a debug build.

I tried to force a debug build by adding --variant=debug to the command and also setting bundleInDebug: false in app/build.gradle but it didn't help.

Is there a way to run a debug build in this situation?

1 Answers

I was having same issue.

I just open one simulator per build to don't use deviceId.

Related