flutter pub get 无法生成 .ios 文件夹解决
要生成 .ios
文件夹需要的条件:
- 必须要用
pubspec.yaml
文件,否则flutter pub get
也不能执行 - 在
pubspec.yaml
中,以下代码必须存在
module:
androidX: true
androidPackage: com.example.flutter_base_component
iosBundleIdentifier: com.example.flutterBaseComponent
- 最坑人的地方是当前项目文件夹内不能存在与
.ios
几乎同名的文件夹ios
, 如果存在,那么生成的ios
文件夹中flutter
下缺少engine
文件夹。
- 最容易也是最不容易发现的地方:
yaml
文件的特殊性,如果缩进不当,也无法生成文件夹。
转载自:https://juejin.cn/post/6941301825618313253