flutter error: 'Flutter/Flutter.h' file not found when flutter run on iOS
今天在研究将项目升级到flutter2.0.5,弄完之后,切换到flutter1.22.4版本分支执行flutter run,项目运行不起来了,一直报错
essages.m:4:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from
按照一般解决方案
flutter clean
flutter pub get
flutter run
又或者
rm -rf ios/Podfile
rm -rf ios/Podfile
flutter run
发现都不生效,关闭vscode、xcode clean、重复上面的步骤都不生效、电脑重启,仍然不生效
最后找到解决方案
1.Remove ios/Flutter/Flutter.podspec: rm ios/Flutter/Flutter.podspec
2.flutter clean
3.Run your app again.
参考