Use of ‘@import‘ when C++ modules are disabled, consider using -fmodules and -fcxx-modules

这里写自定义目录标题 Use of import when C modules are disabled, consider using -fmodules and -fcxx-modules1.报错信息2.解决方案 Use of ‘imp

这里写自定义目录标题

  • Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules
    • 1.报错信息
    • 2.解决方案

Use of ‘@import’ when C++ modules are disabled, consider using -fmodules and -fcxx-modules

1.报错信息

最近用在 iOS Sumilator 上运行 Flutter 项目时, 遇到以下报错:

Parse Issue (Xcode): Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules
/Users/story5/Story5/01Project/Gitee/zqne/ios/Runner/GeneratedPluginRegistrant.m:77:0

Parse Issue (Xcode): Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules
/Users/story5/Story5/01Project/Gitee/zqne/ios/Runner/GeneratedPluginRegistrant.m:89:0

Semantic Issue (Xcode): Use of undeclared identifier 'PathProviderPlugin'
/Users/story5/Story5/01Project/Gitee/zqne/ios/Runner/GeneratedPluginRegistrant.m:136:3

Semantic Issue (Xcode): Use of undeclared identifier 'SharedPreferencesPlugin'
/Users/story5/Story5/01Project/Gitee/zqne/ios/Runner/GeneratedPluginRegistrant.m:138:3

Could not build the application for the simulator.
Error launching application on iPhone 13.

2.解决方案

  1. 在 Xcode 中打开 iOS 项目
  2. 点击 Runner -> TARGETS -> Runner -> Build Settings
  3. 在搜索框中搜索GCC_INPUT_FILETYPE
  4. Compile Sources As 改为 According to File Type

发布者:admin,转转请注明出处:http://www.yc00.com/web/1738333620a4038447.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信