10

I am pretty new to react native and try to run an app with react-native run-android so without expo. The app installs successfully but it crashes immediately without errors. I've created the app with react-native init myapp

When I try to run an app with Android Studio everything works fine. Do you have any tips for me?

2
  • Try upgrading react-native: react-native upgrade and then react-native run-android. Commented Jan 4, 2018 at 17:38
  • Didn't work but I just let it run on an emulator now. On the phone it is still not working. Commented Jan 7, 2018 at 9:29

7 Answers 7

28

./gradlew clean fixed the crash for me

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

Comments

1

So I was missing the permission to draw it over other apps.

Settings -> Applications -> [Select App] -> Permissions -> Flow over Screen -> Allow

1 Comment

this is moved from permissions to the bottom of the "select app" step
1

Also don't forget to restart your bundler: npm start --reset-cache

Comments

0

I don't know how relevant this answer is but still I'll answer this. In my case the app was crashing immediately, but there was some error on the screen (it was not being logged in the console though). It was quickly closing so I was unable to see the error. After some time I found out that I was passing the size prop's value as medium in the ActivityIndicator. That's why it was crashing.

Comments

0

Restarting my laptop did it for me.

I have no idea what the underlying issue is. I'm on mac OS Big sur (11.6.5), I use hermes and flipper.

Comments

0

In my case it was RAM problem, that was causing app crash

I was running my App with phone that had 2GB RAM, On testing it in 8GB device it worked perfectly

If you are doing intensive tasks with your app like like video processing, compression or conversion etc.

RAM could create issue so please do check this scenario also

Comments

-1

If you running app on emulator try running on device , when i run it on device it worked.

then reload app after running on device.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.