Skip to content

Flags to skip launching the emulator for run-android #1128

@peteroid

Description

@peteroid

Describe 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

const result = await tryLaunchEmulator(adbPath);

Related Issues

n/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions