由于没有这样的模块“__ObjC”而无法编译

yol*_*olo 5 xcode objective-c ios ios-simulator flutter

__ObjC我正在尝试在flutter中为iOS构建。\xe3\x80\x80但是,由于找不到模块,编译无法完成。

\n
Launching lib/main.dart on iPhone 13 Pro Max in debug mode...\nmain.dart:1\nXcode build done.                                           42.7s\nFailed to build iOS app\nSwift Compiler Error (Xcode): Using bridging headers with module interfaces is unsupported\n\nUncategorized (Xcode): Command SwiftDriver emitted errors but did not return a nonzero exit code to indicate failure\n\nError (Xcode): no such module '__ObjC'\n/Users/myname/Library/Developer/Xcode/DerivedData/Runner-gnvomxdvkbnvhiftqgeatxtbshib/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/arm64/Runner.private.swiftinterface:11:18\n\nError (Xcode): failed to verify module interface of 'Runner' due to the errors above; the textual interface may be broken by project issues or a compiler bug\n/Users/myname/Library/Developer/Xcode/DerivedData/Runner-gnvomxdvkbnvhiftqgeatxtbshib/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/arm64/Runner.private.swiftinterface:0:0\n\nError (Xcode): no such module '__ObjC'\n/Users/myname/Library/Developer/Xcode/DerivedData/Runner-gnvomxdvkbnvhiftqgeatxtbshib/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/arm64/Runner.swiftinterface:11:18\n\nError (Xcode): failed to verify module interface of 'Runner' due to the errors above; the textual interface may be broken by project issues or a compiler bug\n/Users/myname/Library/Developer/Xcode/DerivedData/Runner-gnvomxdvkbnvhiftqgeatxtbshib/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Objects-normal/arm64/Runner.swiftinterface:0:0\n\nCould not build the application for the simulator.\nError launching application on iPhone 13 Pro Max.\nExited\n
Run Code Online (Sandbox Code Playgroud)\n

什么是 __ObjC?将 Xcode 版本升级到 14.3 后会发生这种情况。\n如何解决此问题?请有人回答。

\n
[\xe2\x9c\x93] Flutter (Channel stable, 3.7.6, on macOS 13.3.1 22E261 darwin-arm64, locale ja-JP)\n    \xe2\x80\xa2 Flutter version 3.7.6 on channel stable at /Users/myname/flutter\n    \xe2\x80\xa2 Upstream repository https://github.com/flutter/flutter.git\n    \xe2\x80\xa2 Framework revision 12cb4eb7a0 (6 weeks ago), 2023-03-01 10:29:26 -0800\n    \xe2\x80\xa2 Engine revision ada363ee93\n    \xe2\x80\xa2 Dart version 2.19.3\n    \xe2\x80\xa2 DevTools version 2.20.1\n\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)\n    \xe2\x80\xa2 Android SDK at /Users/myname/Library/Android/sdk\n    \xe2\x80\xa2 Platform android-33, build-tools 32.1.0-rc1\n    \xe2\x80\xa2 Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java\n    \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)\n    \xe2\x80\xa2 All Android licenses accepted.\n\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 14.3)\n    \xe2\x80\xa2 Xcode at /Applications/Xcode.app/Contents/Developer\n    \xe2\x80\xa2 Build 14E222b\n    \xe2\x80\xa2 CocoaPods version 1.12.0\n\n[\xe2\x9c\x93] Chrome - develop for the web\n    \xe2\x80\xa2 Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome\n\n[\xe2\x9c\x93] Android Studio (version 2021.2)\n    \xe2\x80\xa2 Android Studio at /Applications/Android Studio.app/Contents\n    \xe2\x80\xa2 Flutter plugin can be installed from:\n       https://plugins.jetbrains.com/plugin/9212-flutter\n    \xe2\x80\xa2 Dart plugin can be installed from:\n       https://plugins.jetbrains.com/plugin/6351-dart\n    \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)\n\n[\xe2\x9c\x93] VS Code (version 1.77.1)\n    \xe2\x80\xa2 VS Code at /Applications/Visual Studio Code.app/Contents\n    \xe2\x80\xa2 Flutter extension version 3.62.0\n\n[\xe2\x9c\x93] Connected device (3 available)\n    \xe2\x80\xa2 iPhone 13 Pro Max (mobile) \xe2\x80\xa2 63E17FF6-0922-418E-A209-49173C8A4E71 \xe2\x80\xa2 ios            \xe2\x80\xa2 com.apple.CoreSimulator.SimRuntime.iOS-15-4 (simulator)\n    \xe2\x80\xa2 macOS (desktop)            \xe2\x80\xa2 macos                                \xe2\x80\xa2 darwin-arm64   \xe2\x80\xa2 macOS 13.3.1 22E261 darwin-arm64\n    \xe2\x80\xa2 Chrome (web)               \xe2\x80\xa2 chrome                               \xe2\x80\xa2 web-javascript \xe2\x80\xa2 Google Chrome 112.0.5615.49\n\n[\xe2\x9c\x93] HTTP Host Availability\n    \xe2\x80\xa2 All required HTTP hosts are available\n\n\xe2\x80\xa2 No issues found!\n
Run Code Online (Sandbox Code Playgroud)\n

Hie*_*Lee 1

关注此主题https://github.com/rafaelsetragni/awesome_notifications/issues/773

我通过回到 0.6.21 版本避免了这个问题awesome_notifications