无法构建应用程序,我收到导入文件错误,找不到带有不同软件包的错误
所以我尝试用import导入“ {Any filename} .h”
但是我经常遇到反应本征线性渐变,快速图像,webview等错误
❌ node_modules / react-native-fast-image / ios / FastImage / FFFastImageViewManager.h:1:9: 找不到“ React / RCTViewManager.h”文件
❌ node_modules / react-native-fast-image / ios / FastImage / RCTConvert + FFFastImage.h:1:9: 找不到“ React / RCTConvert.h”文件
导入
^ ~~~~~~~~~~~~~~~~~~
导入
找不到React / RCTViewManager.h'文件(这是由于线性 渐变)包)
答案 0 :(得分:0)
我个人在Podefile
上添加了一些代码,以解决您在此处遇到的标题搜索路径问题
post_install do |installer|
puts 'post_install'
app_project = Xcodeproj::Project.open("./X.xcodeproj")
output = `find .. -name "*.xcodeproj"`
p output
output.split("\n").each do |projectPath|
app_project = Xcodeproj::Project.open(projectPath)
app_project.native_targets.each do |target|
target.build_configurations.each do |config|
if !config.build_settings['HEADER_SEARCH_PATHS']
config.build_settings['HEADER_SEARCH_PATHS'] ||= []
end
config.build_settings['HEADER_SEARCH_PATHS'] << ' $(SRCROOT)/Pods/Headers/**'
config.build_settings['HEADER_SEARCH_PATHS'] <<' $(SRCROOT)/../../../../ios/Pods/Headers/**'
config.build_settings['HEADER_SEARCH_PATHS'] << ' $(SRCROOT)/../../../ios/Pods/Headers/**'
config.build_settings['HEADER_SEARCH_PATHS'] << ' $(SRCROOT)/../../ios/Pods/Headers/**'
config.build_settings['HEADER_SEARCH_PATHS'] << ' $(SRCROOT)/../ios/Pods/Headers/**'
app_project.save
end
end
end
puts 'post_install DONE'
end
我希望能有所帮助