如何修复此 Flutter iOS 构建错误?

tra*_*dev 2 xcode ios flutter

我正在使用 flutter TTS 插件制作一个简单的文本转语音应用程序,并在我的物理 iPhone 和 iPad 上运行它进行调试。

\n

我尝试用谷歌搜索它,flutter 的 github 存储库说我应该运行 flutteranalyze,我就这么做了,但它说没有发现问题。所以我不知道该怎么办。我认为这是 xcode 的问题。

\n

这是我的错误:

\n
Failed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n    ** BUILD FAILED **\n\n\nXcode's output:\n\xe2\x86\xb3\n    <module-includes>:1:9: note: in file included from <module-includes>:1:\n    #import "Headers/flutter_tts-umbrella.h"\n            ^\n    /Users/ragz/Desktop/Desktop/Development/Projects/flutter/useless_app/ios/Pods/Target Support\n    Files/flutter_tts/flutter_tts-umbrella.h:13:9: note: in file included from\n    /Users/ragz/Desktop/Desktop/Development/Projects/flutter/useless_app/ios/Pods/Target Support\n    Files/flutter_tts/flutter_tts-umbrella.h:13:\n    #import "FlutterTtsPlugin.h"\n            ^\n    /Users/ragz/.pub-cache/hosted/pub.dartlang.org/flutter_tts-1.0.0/ios/Classes/FlutterTtsPlugin.h:1:9: error:\n    'Flutter/Flutter.h' file not found\n    #import <Flutter/Flutter.h>\n            ^\n    <unknown>:0: error: could not build Objective-C module 'flutter_tts'\n    note: Using new build system\n    note: Building targets in parallel\n    note: Planning build\n    note: Constructing build description\n    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported\n    deployment target versions is 9.0 to 14.4.99. (in target 'flutter_tts' from project 'Pods')\n    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported\n    deployment target versions is 9.0 to 14.4.99. (in target 'Flutter' from project 'Pods')\n\nCould not build the precompiled application for the device.\n\nError launching application on iPad.\n
Run Code Online (Sandbox Code Playgroud)\n

Bho*_*han 7

- Platform in ios/podfile you can use platform :ios, '10.0'
- If you are changing platform version in podfile than you have to also change version in AppFrameworkInfo.plist.
- Also change version in Deployment Target and Deployment Info of Runner.

- If not working than you have to try with this below commands using for uninstall and install again pods and Run.

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
rm ios/Podfile
flutter run
Run Code Online (Sandbox Code Playgroud)