最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

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

业界 admin 4浏览 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

这里写自定义目录标题

  • 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. 暂无评论