美文网首页
CocoaPods could not find compati

CocoaPods could not find compati

作者: 4VZhang | 来源:发表于2020-03-23 10:55 被阅读0次

    podfile中新增SnapKit

     platform :ios, '9.0'
    target 'xxxxx' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
      pod 'SnapKit', '~> 5.0.1' 
    

    报错如下:

    [!] CocoaPods could not find compatible versions for pod "SnapKit":
      In Podfile:
        SnapKit (~> 5.0.1)
    
    Specs satisfying the `SnapKit (~> 5.0.1)` dependency were found, but they required a higher minimum deployment target.
    

    they required a higher minimum deployment target.可知SnapKit和当前target版本(platform:ios,'9.0')不匹配!

    解决方法

    方法1.提高当前target版本(platform:ios,'10.0')
    方法2.使用匹配当前target版本(platform:ios,'9.0')的SnapKit版本!
    使用podsearch SnapKit 查看可用版本或者去SnapKit主页挑选匹配版本

    SnapKit (5.0.1)
       Harness the power of auto layout with a simplified, chainable, and compile time safe syntax.
       pod 'SnapKit', '~> 5.0.1'
       - Homepage: https://github.com/SnapKit/SnapKit
       - Source:   https://github.com/SnapKit/SnapKit.git
       - Versions: 5.0.1, 5.0.0, 4.2.0, 4.0.1, 4.0.0, 3.2.0, 3.1.2, 3.0.2, 3.0.1, 3.0.0, 0.30.0.beta2, 0.30.0.beta1, 0.22.0, 0.21.1, 0.21.0, 0.20.0, 0.19.1,
       0.19.0, 0.18.0, 0.17.0, 0.16.0, 0.15.0, 0.14.0, 0.13.0, 0.12.0, 0.11.0, 0.10.0 [trunk repo]
    

    podfile修改如下:

       platform :ios, '9.0'
       pod 'SnapKit', '~> 4.2.0'
    

    相关文章

      网友评论

          本文标题:CocoaPods could not find compati

          本文链接:https://www.haomeiwen.com/subject/ukbiyhtx.html