OGeek|极客世界-中国程序员成长平台

标题: ios - 你如何调试 React Native iOS 中的链接错误? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 17:26
标题: ios - 你如何调试 React Native iOS 中的链接错误?

例如 RCTImageLoader 未定义:

enter image description here

它是 RN 中图像库的一部分:

enter image description here

我的 Podfile 中有这个:

在我的 Podfile 中有这一行:pod 'React', :subspecs => ['Core', 'RCTImage', 'RCTNetwork', 'RCTLinkingIOS', 'RCTText', 'RCTWebSocket'], :path => '../node_modules/react-native'

这是我的库: enter image description here

我试过了:



Best Answer-推荐答案


您也可以尝试手动添加头文件,例如 ../node_modules/react-native/Libraries/Image/RCTImageLoader.h

但在我的情况下,这并没有帮助。解决方案是打开 MyProject.xcworkspace 而不是 MyProject.xcproject

关于ios - 你如何调试 React Native iOS 中的链接错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39310473/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4