为什么在使用react-native的xcode过程中出现“module import出现在命名空间中”的错误?

12

我拿到了这个React-Native项目,必须在Podfile上使用use_modular_headers!。我想我需要这样做是因为这个pod MercadoPagoSDK是某种动态库(╯°□°)╯,我不太清楚这在iOS开发世界中意味着什么。

现在我在Xcode上构建时遇到了以下错误!

import of module 'glog.glog.log_severity' appears within namespace 'google'

我找不到解决use_modular_headers!的方法。 我已经尝试过这里的所有想法https://github.com/google/glog/issues/393,但恐怕它们都没有起作用。

1个回答

9

请确保将以下代码添加到您的podfile中,包括modular_headers部分:

pod 'glog',:podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec',:modular_headers => false

更多信息,请查看完整线程:https://github.com/facebook/react-native/issues/26217


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接