pod install failed with error: Library (from `../`)` required by `Podfile` when pod install in iOS

后端 未结 4 1505
自闭症患者
自闭症患者 2021-02-04 08:21

I am making a cocoapods. I am using pod lib create MyLibrary to create a new cocoapods. After it\'s done, I added two files into MyLibrary/Pod/Classes/. And I commi

相关标签:
4条回答
  • 2021-02-04 08:54

    I might be late, but if someone else finds this:

    I often have the same problem, it happens when I use pod install in my own "MyLibrary" instead of pod update.

    So try instead

    pod update
    

    This has to do something with your Podfile.lock, but I cant tell you exactly whats the reason.

    0 讨论(0)
  • 2021-02-04 08:55

    Yeah. One hour I've just paid to solve this problem. The problem was incompatibility of ios versions, a dependency had 7.0 but my target has 6.0 version. Updating to 7.0 the target version has solved my issue. Why wouldn't write an error message for such troubles?...

    0 讨论(0)
  • 2021-02-04 09:05

    I had the same problem and I have been able to solve it following this steps:

    • Update cocoapod
    • Remove Podfile.lock
    • Installing again

    Commands:

    $> sudo gem install cocoapods --pre
    $> rm Podfile.lock
    $> pod install
    

    Maybe some are not necessary, but it worked for me (I think that the most important is to remove the Podfile.lock). I hope you can solve it too.

    0 讨论(0)
  • 2021-02-04 09:06

    try this:

    $ sudo rm -fr ~/Library/Caches/CocoaPods/
    $ sudo rm -fr ~/.cocoapods/repos/master/
    

    it works for me. I hope this solution will work for you too.

    0 讨论(0)
提交回复
热议问题