- OC 项目导入image_gallery_saver 运行报错问
- 关于flutter控件image_gallery_saver i
- Android studio 运行项目`Error:Execut
- iOS 多Target若干问题处理
- 2018-01-18 终极解决github项目导入studio
- 【Flutter】Target of URI doesn't e
- iOS Undefined symbol: _res_9_ge
- iOS - Undefined symbols for arch
- 导入项目运行报错:某些输入文件使用或覆盖了已过时的 API...
- dyld: Library not loaded: @rpath
image_gallery_saver 是flutter 保存图片的插件,由于iOS 端插件使用swift编写,flutter通过pubspec.yaml文件中将image_gallery_saver 导入,运行报错,报错如下
.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.1.0/ios/Classes/ImageGallerySaverPlugin.m:2:9: fatal error: 'image_gallery_saver/image_gallery_saver-Swift.h' file not found
#import <image_gallery_saver/image_gallery_saver-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
于是乎全网开始查找解决方案,最后在image_gallery_saver github中找到答案:
https://github.com/hui-z/image_gallery_saver/issues/24
具体解决方案如下:
1、打开iOS项目,创建一个空的swift的文件,创建时会默认弹出是否创建桥接文件,并创建桥接文件
2、将ImageGallerySaverPlugin.m中的#import <image_gallery_saver/image_gallery_saver-Swift.h>替换成#import <image_gallery_saver-Swift.h>
3、运行,项目正常启动,问题解决
网友评论