vscode flutter xCode 16 Parse问题(Xcode):需要模块“Foundation”但尚未提供,并且禁用了模块文件的隐式使用

问题描述 投票:0回答:1
Flutter (Channel stable, 3.24.3, on macOS 14.6.1 23G93 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.24.3 on channel stable at /Users/gaoang/workPlace/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (6 days ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/gaoang/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.93.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.96.0

flutter+xcode15 vscode 运行就ok了! 然后升级到xcode16 vscode 运行flutter代码就有这个了。

>     > Could not build the precompiled application for the device. Parse
>     > Issue (Xcode): Module 'Foundation' is needed but has not been
>     > provided, and implicit use of module files is disabled

尝试升级vscode到最新版本。不行 怎么解决这个问题,

flutter xcode16
1个回答
0
投票

由于在上一个类似问题中还没有公认的答案,我将分解该选项:

选项 1 - 启用允许框架模块中包含非模块化内容

  1. 在 Xcode 中打开您的项目(您的 iOS 文件夹)
  2. 在左侧菜单中选择跑步者
  3. 然后转到
    Build Settings
    部分
  4. 搜索(在过滤器中)
    allow non-modular includes in framework
  5. 将变量设置为 yes

选项 2 - 重新安装 Xcode

这个答案基于 Xcode 15.4。

© www.soinside.com 2019 - 2024. All rights reserved.