报错信息:
The Swift pod `qr_code_scanner` depends upon `MTBBarcodeScanner`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
翻译过来:
Swift pod“qr_code_scanner”依赖于“MTBBarcodeScanner”,它不定义模块。要选择生成模块映射的目标(当构建为静态库时,从Swift导入它们是必要的),可以设置`use_modular_headers!`在Podfile中全局设置,或者为特定依赖项指定“:modular_headers=>true”。
这样看清晰多了,是在导入qr_code_scanner依赖包之后出现的问题,百度了一下,通过这篇文章找到解决办法,
[BUG] cannot build ios because The Swift pod qr_code_scanner depends upon MTBBarcodeScanner
在target 'Runner' do里面,加两行代码即可。
use_modular_headers!
use_frameworks!