android – React Native: app doesn't load, but no error messages, after installing react-navigation-ThrowExceptions

Exception or error:

I followed all the steps in React Native’s get started page, including running npx react-native init AwesomeProject
to create a starter project. (I’m following the steps for “React Native CLI Quickstart” / “macOS” / “Android”). Then I open up Android Studio, start the emulator, cd into the project’s folder, and run npx react-native run-android. Everything works fine. I get to tweak the starter project here and there, reload, and everything works.

But I need to use React Navigation. I follow the steps here and apparently React Navigation is installed without any issues. Then when I run npx react-native run-android again the thing builds successfully and that Metro thing – that separate Terminal tab/window – says “done”. But the emulator doesn’t show my app. For a second it shows a blank page and then that disappears and I get the emulator’s home screen. That’s even if I don’t tweak the starter code at all – I’m not even trying to import React Navigation, all I need to do to cause this error is to have it installed.

Here’s what my Terminal tabs look like after npx react-native run-android:

enter image description here

enter image description here

I’ve tried closing Terminal and Android Studio after installing React Navigation. Same thing.

I’m using macOS 10.15.3 and Android Studio 3.5.3.

What am I doing wrong?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *