当前位置:网站首页>If you‘re running pod install manually, make sure flutter pub get is executed first.

If you‘re running pod install manually, make sure flutter pub get is executed first.

2022-07-06 22:36:00 刘刘小博

错误1

执行 pod install
报错
[!] Invalid Podfile file: /Users/liubo/Downloads/gallery-main/ios/Flutter/Generated.xcconfig must exist. If you’re running pod install manually, make sure flutter pub get is executed first.

根据提示,需要先添加 flutter 包

所以 执行 flutter packages get

然后又报错
The current Flutter SDK version is 3.0.4.

Because gallery requires Flutter SDK version >=3.1.0-0, version solving failed.
Running “flutter pub get” in gallery-main…
pub get failed (1; Because gallery requires Flutter SDK version >=3.1.0-0, version solving failed.)

再执行 flutter upgrade

Flutter is already up to date on channel stable
Flutter 3.0.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 85684f9300 (5 days ago) • 2022-06-30 13:22:47 -0700
Engine • revision 6ba2af10bb
Tools • Dart 2.17.5 • DevTools 2.12.2
192:ios liubo$ flutter packages get
Changing current working directory to: /

根据提示 3.0.4 已经是最新版本了
但是工程需要的是 3.1.0,

然后修改配置文件请添加图片描述
这样就可以了

原网站

版权声明
本文为[刘刘小博]所创,转载请带上原文链接,感谢
https://blog.csdn.net/LIUXIAOXIAOBO/article/details/125628734