flutter 导出framework

2020-07-16  本文已影响0人  发小徒

导出flutter相关包到指定路径(注意=两边不能有空格)
flutter build ios-framework --output=.. /flutter_framework

导出成功的话flutter_framework下有(Debug Profile Release)三个文件夹

Debug文件目录如下

Debug
│ ├── App.framework
│ │ └── flutter_assets
│ │ ├── fonts
│ │ ├── images
│ │ │ ├── 2.0x
│ │ │ └── 3.0x
│ │ └── packages
│ │ └── cupertino_icons
│ │ └── assets
│ ├── Flutter.framework
│ │ ├── Headers
│ │ ├── Modules
│ │ └── _CodeSignature
│ ├── FlutterPluginRegistrant.framework
│ │ ├── Headers
│ │ └── Modules
│ └── shared_preferences.framework
│ ├── Headers
│ └── Modules

在工程中添加导出的framework包

编译工程会报如下错误

dyld: Library not loaded: ... : image not found

解决方案

1.Build Phases 增加Copy Files

2.Destination 选择 Frameworks

3.把报错的包添加进去

编译运行,通过

上一篇 下一篇

猜你喜欢

热点阅读