skip to Main Content

Im trying to run RN application from android studio and it works ok, but I need react-native run-android –mode=stagingdebug instead of just react-native run-android

How can I do that?

I have tried to add –mode=stagingdebug in configuration flags, but I got error:

Installation failed due to: ''package install-create -r -t --user current --full --dont-kill --mode=stagingdebug --skip-verification -S 28237666' returns error 'Unknown failure: Exception occurred while executing 'install-create':

java.lang.IllegalArgumentException: Unknown option –mode=stagingdebug

2

Answers


  1. Chosen as BEST ANSWER

    I was able to find it, at left bottom side, there is dropdown: Build Variants, thats where you can choose it.


  2. I think that you can just add this flag to the "flags" box.

    Take a look at this in the official documentation: https://developer.android.com/studio/run/rundebugconfig

    Just pass the flag you want.

    But, you are running in the /android folder right?
    Because when you run a react native project in the android studio, the IDE does not run "react-native run android", the gradlew is used istead

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search