当前位置:网站首页>No matching function for call to ‘RCTBridgeModuleNameForClass‘
No matching function for call to ‘RCTBridgeModuleNameForClass‘
2022-08-04 05:29:00 【语歆】
XCode升级到12.5 Beta 之后React Native 打包 ios 异常
解决方案:修改 Podfile,新增以下脚本
post_install do |installer|
## Fix for XCode 12.5
find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
"RCTBridgeModuleNameForClass(module))", "RCTBridgeModuleNameForClass(Class(module)))")
end
Podfile 结尾新增以下脚本
def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end
报错截图:
报错日志:
No matching function for call to 'RCTBridgeModuleNameForClass'
cannot initialize a parameter of type 'NSArray<id<RCTBridgeModule>> *' with an lvalue of type 'NSArray<Class> *__strong' NSArray<RCTModuleData *> *newModules = [self _initializeModules:modules withDispatchGroup:NULL lazilyDiscovered:YES];
node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm:307:13: No matching function for call to 'RCTBridgeModuleNameForClass'
参考链接:
边栏推荐
- [Deep Learning 21 Days Learning Challenge] 2. Complex sample classification and recognition - convolutional neural network (CNN) clothing image classification
- MFC读取点云,只能正常显示第一个,显示后面时报错
- 浅谈游戏音效测试点
- AIDL communication between two APPs
- tensorRT教程——使用tensorRT OP 搭建自己的网络
- 基于BiGRU和GAN的数据生成方法
- PyTorch
- 语音驱动嘴型与面部动画生成的现状和趋势
- 典型CCN网络——efficientNet(2019-Google-已开源)
- [Go language entry notes] 13. Structure (struct)
猜你喜欢
随机推荐
pgsql函数中的return类型
动手学深度学习__数据操作
Th in thymeleaf: href use notes
TensorFlow2学习笔记:5、常用激活函数
postgres 递归查询
WARNING: sql version 9.2, server version 11.0.Some psql features might not work.
Jupyter Notebook installed library;ModuleNotFoundError: No module named 'plotly' solution.
【论文阅读】Multi-View Spectral Clustering with Optimal Neighborhood Laplacian Matrix
tensorRT教程——使用tensorRT OP 搭建自己的网络
周志华机器学习
TensorFlow2 study notes: 6. Overfitting and underfitting, and their mitigation solutions
双重指针的使用
DeblurGAN-v2: Deblurring (Orders-of-Magnitude) Faster and Better 图像去模糊
【论文阅读】Exploring Spatial Significance via Hybrid Pyramidal Graph Network for Vehicle Re-identificatio
TypeError: load() missing 1 required positional argument: ‘Loader‘
安卓连接mysql数据库,使用okhttp
动手学深度学习_卷积神经网络CNN
latex-写论文时一些常用设置
Androd Day02
【深度学习21天学习挑战赛】备忘篇:我们的神经网模型到底长啥样?——model.summary()详解