更新flutte 或者原有的multi_image_picker
2020-05-12 本文已影响0人
Faith_K
报错
[!] CDN: trunk Repo update failed - 4 error(s):
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/c/7/9/Reachability/3.0.0/Reachability.podspec.json Response: Couldn't connect to server
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/c/7/9/Reachability/3.1.0/Reachability.podspec.json Response: Couldn't connect to server
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/c/7/9/Reachability/3.1.1/Reachability.podspec.json Response: Couldn't connect to server
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/c/7/9/Reachability/3.2/Reachability.podspec.json Response: Couldn't connect to server
先在终端执行
pod repo remove trunk
若是更新 pod 库的时候失败,则需要在 podfile 添加
source 'https://github.com/CocoaPods/Specs.git'
podfile 文件中添加 source 源后,pod install 和 pod update 就可以正常操作
image.png
2.报错,
[!] CocoaPods could not find compatible versions for pod "BSImagePicker":
In snapshot (Podfile.lock):
BSImagePicker (= 2.10.0, ~> 2.10.0)
In Podfile:
multi_image_picker (from `.symlinks/plugins/multi_image_picker/ios`) was resolved to 4.6.7, which depends on
BSImagePicker (~> 2.10.3)
Specs satisfying the `BSImagePicker (= 2.10.0, ~> 2.10.0), BSImagePicker (~> 2.10.3)` dependency were found, but they required a higher minimum deployment target.
大概就是 BSImagePicker 这个可以对应的版本2.10.3没有找到 ,我们可以在终端 搜索一下这个库
执行
pod search BSImagePicker
image.png
可以上得到当前最高版本为 BSImagePicker (~> 2.10.0) 这个时候我们修改flutter 里面multi_image_picker 库对应的依赖BSImagePicker的版本就行了 如下图
image.png
然后pod install 搞定