配置React Native Splash Screen时,出现以下错误“ React / RCTBridgeModule.h”文件。我已经在线查看了解决方案,但没有设法找到明确的解决方案。
我已经在线尝试了一些解决方案,并且遍历了“启动画面”文档中的步骤,但无济于事。错误出现在RNSplashScreen.h
我正在使用React native 6.0 +
答案 0 :(得分:1)
$ npm i react-native-splash-screen --save
$ cd ./ios
$ pod update
You don't need to do react-native link on XCode 11 beta + RN >= 0.60
And 'Do Not' add the libSplashScreen.a library to Link Binary With Libraries since this will cause the 'Duplicate Symbol Error'.
And go to AppDelegate.m and import the header as follows
#import <react-native-splash-screen/RNSplashScreen.h>
instead of
#import "RNSplashScreen.h"
从以下链接获得
https://github.com/crazycodeboy/react-native-splash-screen/issues/215
答案 1 :(得分:0)
https://stackoverflow.com/a/43340802/6000586为我工作。 在新的Finder窗口中显示node_modules / react-native / React / React.xcodeproj,然后从此处拖动到Xcode中的库。