当前位置:网站首页>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)))")
endPodfile 结尾新增以下脚本
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'
参考链接:
边栏推荐
猜你喜欢

Install dlib step pit record, error: WARNING: pip is configured with locations that require TLS/SSL

【论文阅读】Anchor-Free Person Search

tensorRT5.15 使用中的注意点

浅谈游戏音效测试点

【深度学习21天学习挑战赛】3、使用自制数据集——卷积神经网络(CNN)天气识别

【论文阅读】TransReID: Transformer-based Object Re-Identification

动手学深度学习_卷积神经网络CNN

Use of double pointers

【论文阅读】Further Non-local and Channel Attention Networks for Vehicle Re-identification

逻辑回归---简介、API简介、案例:癌症分类预测、分类评估法以及ROC曲线和AUC指标
随机推荐
(TensorFlow) - detailed explanation of tf.variable_scope and tf.name_scope
Usage of Thread, Handler and IntentService
Deep Adversarial Decomposition: A Unified Framework for Separating Superimposed Images
【go语言入门笔记】13、 结构体(struct)
逻辑回归---简介、API简介、案例:癌症分类预测、分类评估法以及ROC曲线和AUC指标
postgresql 游标(cursor)的使用
图像resize
DeblurGAN-v2: Deblurring (Orders-of-Magnitude) Faster and Better 图像去模糊
Polynomial Regression (PolynomialFeatures)
Thread 、Handler和IntentService的用法
(TensorFlow)——tf.variable_scope和tf.name_scope详解
深度确定性策略梯度(DDPG)
计算某像素点法线
安装dlib踩坑记录,报错:WARNING: pip is configured with locations that require TLS/SSL
pytorch学习-没掌握的点
TensorFlow2 study notes: 7. Optimizer
【CV-Learning】卷积神经网络
Dictionary feature extraction, text feature extraction.
sql中group by的用法
Usage of RecyclerView