例如 RCTImageLoader 未定义:
它是 RN 中图像库的一部分:
我的 Podfile
中有这个:
在我的 Podfile 中有这一行:pod 'React', :subspecs => ['Core', 'RCTImage', 'RCTNetwork', 'RCTLinkingIOS', 'RCTText', 'RCTWebSocket'], :path => '../node_modules/react-native'
我试过:
- 项目 -> 清理
- 再次运行
pod install
- 删除
Podfile.lock
&&pod install
- 新鲜的 git 克隆,
npm install && cd ios && pod install
最佳答案
您也可以尝试手动添加头文件,例如../node_modules/react-native/Libraries/Image/RCTImageLoader.h
。
但是在我的情况下,这没有帮助。解决方案是打开 MyProject.xcworkspace
而不是 MyProject.xcproject
关于ios - 你如何调试 React Native iOS 中的链接错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39310473/