- CocoaPods could not find compati
- CocoaPods could not find compati
- CocoaPods could not find compati
- CocoaPods could not find compati
- CocoaPods could not find compati
- CocoaPods could not find compati
- CocoaPods could not find compati
- CocoaPods could not find compati
- CocoaPods could not find compati
- CocoaPods could not find compati
我自己发布了一个开源库到CocoaPods上,使用pod search
也可以搜索到,
但每次使用
pod install
进行安装的时候,会报这个错
[!] CocoaPods could not find compatible versions for pod "DJExtension":
In Podfile:
DJExtension (~> 1.2.3)
Specs satisfying the `DJExtension (~> 1.2.3)` dependency were found, but they required a higher minimum deployment target.
使用pod repo update
更新仓库,还是不行,最后找到原因了,如下:
我的开源库的DJExtension.podspec文件中关于deployment target的配置写的是10.0, s.ios.deployment_target = '10.0'
,
而我的项目的podfile中的platform是默认的9.0,platform :ios, '9.0'
当podfile中支持的iOS版本低于开源库指定的版本时,就安装不成功了。
解决办法有两个:
- 如果这个库是你自己写的,可以改下podspec文件,把系统版本写小一点儿,比如8.0。
- 直接把自己项目的podfile中的版本改成10.0,同开源库要求的最低系统版本一致,就可以了。
我把podfile中的版本改成10.0,安装成功了,如下图:
Have fun.
网友评论