Pod安装安装不推荐的反应并创建一个构建错误'React / RCTBridge.h'找不到

时间:2018-04-24 11:49:05

标签: react-native cocoapods react-native-ios

我最近添加了一些pod并将pod install运行到以前正在运行的项目中,现在我收到警告Analyzing dependencies Fetching podspec for `ViroKit` from `../node_modules/react-viro/ios/dist/ViroRenderer/` Fetching podspec for `ViroReact` from `../node_modules/react-viro/ios/` Fetching podspec for `react-native-camera` from `../node_modules/react-native-camera` Downloading dependencies Using AWSCore (2.6.16) Using AWSDynamoDB (2.6.16) Using BoringSSL (10.0.2) Using Crashlytics (3.10.1) Using Fabric (1.7.6) Using Firebase (4.13.0) Using FirebaseABTesting (1.0.0) Using FirebaseAnalytics (4.2.0) Using FirebaseAuth (4.6.1) Using FirebaseCore (4.0.20) Using FirebaseDatabase (4.1.5) Using FirebaseDynamicLinks (2.3.2) Using FirebaseFirestore (0.11.0) Using FirebaseInstanceID (2.0.10) Using FirebaseMessaging (2.2.0) Using FirebasePerformance (1.1.3) Using FirebaseRemoteConfig (2.1.3) Using FirebaseStorage (2.2.0) Using FirebaseSwizzlingUtilities (1.0.1) Using GTMSessionFetcher (1.1.6) Using GVRAudioSDK (1.120.0) Using GVRSDK (1.120.0) Using GoogleToolboxForMac (2.1.0) Using Protobuf (3.5.0) Installing React (0.11.0) Using ViroKit (1.0) Using ViroReact (1.0) Using gRPC (1.11.0) Using gRPC-Core (1.11.0) Using gRPC-ProtoRPC (1.11.0) Using gRPC-RxLibrary (1.11.0) Using leveldb-library (1.20) Using nanopb (0.3.8) Installing react-native-camera (1.1.1) Generating Pods project Integrating client project Sending stats Pod installation complete! There are 14 dependencies from the Podfile and 34 total pods installed. [!] React has been deprecated 并且似​​乎有问题链接到React并且生成错误`React / RCTBridge.h'文件没有找到。这种类型的问题似乎发生在我尝试通过pod安装添加的几个不同的库中。

{{1}}

我是否应该在我的Xcode或pod文件中配置React的正确方法?

1 个答案:

答案 0 :(得分:0)

解决方法: 添加到podfile

pod'React',路径:'../node_modules/react-native' pod'yoga',路径:'../ node_modules / react-native / ReactCommon / yoga'