Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native app starts to a white screen

I'm using React Native to develop an Android app. Sometimes, after I run react-native run-android and my app starts, it hangs on a white screen. Shaking my phone doesn't do anything, and when I click 'pause' in the VSCode debugger it has no effect. If I press the Home button to background the app, then click on the app again, it launches normally and debugging works as expected. Is this a known issue? What can I do to fix it?

like image 525
James Ko Avatar asked May 20 '18 04:05

James Ko


1 Answers

  1. Open your android folder in Android studio
  2. Press the green Play button
  3. Open the logcat window from the bottom bar
  4. Make sure the Device and Process are point to the right value, then inspect any error there

I don't have this problem, you need to inspect what happened at run-time to see how to fix this.

like image 50
Albert Gao Avatar answered Oct 13 '22 20:10

Albert Gao