Reputation: 550
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?
Upvotes: 11
Views: 28357
Reputation: 105
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
Upvotes: 0
Reputation: 662
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.
Upvotes: -1
Reputation: 10912
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.
Upvotes: 0
Reputation: 95
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.
Upvotes: 0
Reputation: 381
Also don't forget to restart your bundler: npm start --reset-cache
Upvotes: 1
Reputation: 550
So I was missing the permission to draw it over other apps.
Settings -> Applications -> [Select App] -> Permissions -> Flow over Screen -> Allow
Upvotes: 1