Flags to skip launching the emulator for `run-android`
See original GitHub issueDescribe the Feature
In the current version, an emulator will be launched when we run react-native run-android ...
and there is no way to skip launching it.
In my project, the use case of run-android
is to run different gradle tasks like the following which doesn’t need the emulator at all.
$ react-native run-android --tasks clean,assembleRelease,uploadRelease
However, the emulator will be launched for every run of run-android
and I have to close it again and again.
This is actually a dilemma that we can definitely use the original gradle cli. In this case, we need to run the jetifier
on our own and this is not the optimal scenario.
Possible Implementations
Support a new flag, e.g. --no-emulator
and add a condition at https://github.com/react-native-community/cli/blob/a5d837543dad8b3f40b4d2449963542e5d3abefe/packages/platform-android/src/commands/runAndroid/runOnAllDevices.ts#L39
Related Issues
n/a
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top GitHub Comments
This can also help some CI like Bitrise, today when you run with the purpose of generating an apk you will get an error
We could avoid it using
That’s a workaround. The solution to this issue can’t be just “plug an android device”.
+1 for this approach