Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native white blank screen issue

Tags:

react-native

Always getting white blank screen when running the app on the physical device in android case. Using react-native-navigation can't able to detect the bug please help!

I have created a fresh react-native project and integrated the react-native-navigation library into it and when I am running the app in my physical device by running the command yarn run android it runs but shows blank white screen in android. Once it runs successfully but now it won't.

like image 803
kViN Avatar asked Aug 06 '18 10:08

kViN


People also ask

Why is react native screen white?

Usually, we get a blank screen when the app is not connected to React Native development server. Make sure that you have started the development server in another terminal using npm start in project root folder. If dev server is running then dev server can be accessed locally over USB or over Wifi.

Why my React screen is blank?

A blank or white screen occurs when React encounters a rendering error in a component (for example, trying to render obj. param when obj is undefined). You would probably think that when React encounters an error, the faulty component and descendants will unmount.


3 Answers

run react-native start in a separate terminal and then run react-native run-android.

like image 93
Neeraj Negi Avatar answered Sep 21 '22 15:09

Neeraj Negi


i recently faced two kind of white screen problem

1.always showing white screen (due to bundling..) solutions is

react-native start 

and then

react-native run-android 

2.it shows white screen some particular seconds or suddenly always shows white screen in properly working app

due to app cache or traffic

solutions is

Androidmanifest.xml

android:usesCleartextTraffic="true"
like image 27
ßãlãjî Avatar answered Sep 18 '22 15:09

ßãlãjî


I also faced same issue in the emulator. So the way I solved it is by going into Android settings - Apps - select the app, and force stop it. Then I tried opening the app again and it worked.

Before I did this, I removed the 'build' folder under /android/app/ and re-ran. Did not work.

like image 36
S R Chaitanya Avatar answered Sep 18 '22 15:09

S R Chaitanya