【原创】解决React Native白屏无法运行的问题

blogdaren 2018-07-01 抢沙发 2247人次

问题背景:

如题,React Native调试期间突然白屏,APP无法运行,查看日志发现大量如下Warning:

..............................................
..............................................
07-01 23:30:30.814 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:30.831 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:30.848 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:30.865 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:30.882 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:30.894 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:30.895 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:31.125 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:31.126 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
07-01 23:30:31.161 16938 16938 W unknown:ReactNative: Unable to dispatch touch to JS as the catalyst instance has not been attached
..............................................
..............................................  

问题原因:

原因说不好,不过根据金牛座经验,是 node.js packger 服务出问题了,所以重启下服务即可。

解决方案:

[root@node1] killall  node 
[root@node1] react-native start

版权声明:除非注明,本文由( blogdaren )原创,转载请保留文章出处。

本文链接:【原创】解决React Native白屏无法运行的问题

发表评论:

您的昵称:
电子邮件:
个人主页:

Free Web Hosting