【问题标题】:React/RCTBridgeModule.h file not found RNSSplashScreenReact/RCTBridgeModule.h 文件未找到 RNSSplashScreen
【发布时间】:2020-01-25 23:12:06
【问题描述】:

在配置 React Native Splash Screen 时,我收到以下错误“React/RCTBridgeModule.h”文件未找到。我在网上查看了解决方案,但我没有设法找到明确的解决方案。

我已经尝试了一些在线解决方案,并且我已经完成了启动屏幕文档中的步骤,但无济于事。错误出现在 RNSplashScreen.h

我正在使用 React 本机 6.0+

【问题讨论】:

  • 我在构建设置中的标题搜索路径中添加了“${PODS_ROOT}/Headers/Public/react-native-splash-screen”,但无济于事。
  • 我也厌倦了删除我的 podfile 并重新安装
  • 我面临同样的问题。你解决了吗?

标签: reactjs xcode react-native splash-screen


【解决方案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

【讨论】:

    猜你喜欢
    • 2017-05-30
    • 1970-01-01
    • 2019-05-01
    • 2019-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-18
    相关资源
    最近更新 更多