【问题标题】:ReactNative 'React/RCTBundleURLProvider.h' file not found with react-native-fbsdk使用 react-native-fbsdk 找不到 ReactNative 'React/RCTBundleURLProvider.h' 文件
【发布时间】:2018-03-10 13:58:35
【问题描述】:

我按照说明安装了 react-native-fbsdk。 https://github.com/facebook/react-native-fbsdk

但是,我在 AppDelegate.m 中遇到了错误

'React/RCTBundleURLProvider.h' 文件未找到

#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h> <- Error here
#import <React/RCTRootView.h>
#import "RNFIRMessaging.h"

卸载 react-native-fbsdk 解决了这个问题,所以显然这个库导致了这个问题。 我尝试过的事情是

  1. 像这样编辑架构React Native 0.40.0 : RCTBundleURLProvider.h” file not found - AppDelegate.m
  2. 安装不同的版本(0.5、0.6、0.6.1)
  3. 关注 SnehaGindi 对https://github.com/facebook/react-native/issues/12077 的评论

所有这些都不起作用。

我的 package.json 如下所示。 有什么线索吗?

{
  "name": "BitcoinApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "axios": "0.16.2",
    "moment": "2.18.1",
    "native-base": "2.1.5",
    "react": "16.0.0-alpha.12",
    "react-base": "0.2.0",
    "react-native": "0.45.1",
    "react-native-app-intro": "1.1.5",
    "react-native-fbsdk": "^0.6.0",
    "react-native-fcm": "^7.5.1",
    "react-native-firebase-analytics": "^3.0.2",
    "react-native-gifted-form": "0.0.14",
    "react-native-loading-spinner-overlay": "0.5.0",
    "react-native-pathjs-charts": "0.0.29",
    "react-native-scrollable-tab-view": "0.6.6",
    "react-native-social-share": "^1.1.0",
    "react-native-store": "0.4.1",
    "react-navigation": "1.0.0-beta.11"
  },
  "devDependencies": {
    "babel-jest": "20.0.3",
    "babel-preset-react-native": "1.9.2",
    "eslint-config-rallycoding": "^3.2.0",
    "jest": "20.0.4",
    "react-test-renderer": "16.0.0-alpha.12"
  },
  "jest": {
    "preset": "react-native"
  }
}

【问题讨论】:

    标签: ios facebook react-native facebook-sdk-4.0


    【解决方案1】:

    解决了。

    卸载 SDK 并再次阅读以下说明。 https://developers.facebook.com/docs/ios/getting-started/

    这次,在“第 2 步:下载 Facebook SDK for iOS”中,将 SDK 放在“~/Documents/FacebookSDK”中。

    所以,这个问题是因为 SDK 目录放置在“~/Documents/FacebookSDK”之外。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多