今天在研究将项目升级到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.

参考

https://stackoverflow.com/a/65577277

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2021-09-07
  • 2021-08-01
  • 2021-08-02
  • 2021-09-27
  • 2021-07-10
猜你喜欢
  • 2021-06-30
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2022-12-23
相关资源
相似解决方案