最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

运维笔记admin4浏览0评论

这里写自定义目录标题

  • 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
发布评论

评论列表(0)

  1. 暂无评论