xcode - 为什么我会收到此错误:带有 react-native 的 xcode 上的“模块导入出现在命名空间内”?
问题描述
我得到了这个 react-native 项目,我不得不use_modular_headers!
在Podfile
. 我想我需要它,因为这pod MercadoPagoSDK
是某种动态库(╯°□°)╯,我真的不知道这对 iOS 开发世界意味着什么。
现在我在 xcode 上构建时遇到了这个错误!
import of module 'glog.glog.log_severity' appears within namespace 'google'
我没有找到解决这个user_modular_headers!
问题的方法。我已经尝试了这里的所有想法https://github.com/google/glog/issues/393但恐怕它们都没有奏效。
解决方案
确保将以下内容添加到您的 podfile 中,包括 modules_headers 部分: pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec', :modular_headers => false
有关更多信息,请查看此处的完整主题:https ://github.com/facebook/react-native/issues/26217
推荐阅读
- ms-access - 根据更新查询更新表中的数量字段
- c# - 找不到 System.Windows.Media.editing 命名空间
- kubernetes - Kubernetes HPA 更改同步周期
- java - 编译 module-info.java 时抛出异常
- pyspark - 将文件数据处理到 kafka 并引发结构化流的问题
- android - 在地图上同时显示多个用户的位置(Kotlin、Firebase 实时数据库)
- python - NLP / ModuleNotFoundError
- flutter - 如何在firestore上的集合内的文档内的集合内按字段删除文档
- python - .json 文件中的嵌套字典 | 迭代问题
- php - PHP try catch 不会因 Laravel 代码错误而失败