1

I have a react-native app that I have just ejected from expo to a bare react-native app.

I can run yarn react-native run-android without any errors and even opens my android emulator however, I can't see my app available within the emulator.

Should this open automatically or should I see it available in the app draw?

How can I start my app within the emulator?

enter image description here

note: the Who Am I app is not it. It's my built version via expo before I ejected.

1 Answer 1

1

The command should be react-native run-android not yarn react-native run-android unless you defined the script react-native run-android as itself in your package.json.

Then the app should start by itself in the emulator, but you have to run react-native start to use it.

react-native run-android installs the app on the emulator so you should be able to find the launch icon of your app inside the emulator

Using react-native run-android without exactly one device (one emulator or one real device) leads to an error (Failed to install the app. Make sure you have an Android emulator running or a device connected. in case none is connected) thus if you don't have a real device connected your emulator is detected.

Sign up to request clarification or add additional context in comments.

9 Comments

I'm using yarn so I need to prefix with yarn stackoverflow.com/a/60303085/3528590
I'm using yarn too ;)
I have just tried with npx react-native run-android and get the same thing
Do you have react-native installed globally via NPM or via Yarn?
yes I have but I run react-native with yarn android since I have in the script part of my package.json this line: "android": "react-native run-android"
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.