
我确实被这个错误困住了-- React/RCTAssert.h‘文件没有找到,我跟踪了其他问题,表明头搜索路径对于测试目标可能是错误的。因此,我甚至删除了测试目标。
srcroot =/Users/shyamnath/Desktop/app/xxx/ios
//:configuration = Debug
HEADER_SEARCH_PATHS =
$(inherited)
$(SRCROOT)/../node_modules/react-native-splash-screen/ios
$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo
$(SRCROOT)/../node_modules/react-native/React
$(SRCROOT)/../node_modules/react-native-aes-kit/ios/RCTAesCrypto/**
//:configuration = Release
HEADER_SEARCH_PATHS =
$(inherited)
$(SRCROOT)/../node_modules/react-native-splash-screen/ios
$(SRCROOT)/../node_modules/react-native-device-info/RNDeviceInfo
$(SRCROOT)/../node_modules/react-native/React
$(SRCROOT)/../node_modules/react-native-aes-kit/ios/RCTAesCrypto/**
//:completeSettings = some
HEADER_SEARCH_PATHS上面显示的标题搜索路径有什么明显的错误吗?我试着清理和重建这个项目,但似乎什么也解决不了它。
项目目录下的文件如下, 安卓 index.js package-lock.json应用程序 ios package.json app.json node_modules yarn.lock
这可能是因为node_modules文件夹不在ios中吗?和srcroot the /Users/shyamnath/Desktop/app/xxx/ios
发布于 2019-03-27 12:46:06
我所面临的同样问题,通过添加到Project和Target的路径来解决。
$(SRCROOT)/../node_modules/react-native/React
因此,请按照以下步骤:
'AwesomeProject‘-> AwesomeProject(目标) ->构建设置->头搜索路径
`$(SRCROOT)/../node_modules/react-native/React`并将上述路径添加为递归路径(如果不存在的话)。
'AwesomeProject‘-> AwesomeProjectTest(目标) ->构建设置->头搜索路径
`$(SRCROOT)/../node_modules/react-native/React`并将上述路径添加为递归路径。
我已经提到了回答。
希望这能帮上忙。
https://stackoverflow.com/questions/51552107
复制相似问题