pod安装失败,错误:在iOS中安装pod时,`Podfile`需要库(来自`../`)` [英] pod install failed with error: Library (from `../`)` required by `Podfile` when pod install in iOS

查看:527
本文介绍了pod安装失败,错误:在iOS中安装pod时,`Podfile`需要库(来自`../`)`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个cocoapods。我正在使用 pod lib创建MyLibrary 来创建一个新的cocoapods。完成后,我将两个文件添加到MyLibrary / Pod / Classes /中。然后我提交并添加一个标签然后推送到原始主人。并且MyLibrary.podspec通过了验证。所以,我进入我在 pod lib创建MyLibrary 时创建的Example文件夹。并在终端中执行 pod install 。但我收到错误:

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 commit and add a tag and then push to origin master. and the MyLibrary.podspec passed validation. So, I go into the Example folder which created when I do pod lib create MyLibrary. and do a pod install in the terminal. But I am getting error:

Analyzing dependencies
Fetching podspec for `MyLibrary` from `../`
[!] Unable to satisfy the following requirements:

- `MyLibrary (from `../`)` required by `Podfile`

podspec设置都是正确的,比如这个 s.source_files ='Pod / Classes / *。{h,m}',它通过了验证。所以我认为pod spec文件没有问题。看来pod安装无法找到Pod文件夹。但它就在那里。

The podspec settings are all correct, like this one s.source_files = 'Pod/Classes/*.{h,m}', and it passed the validation. So I think there is no problem with pod spec file. It seems the pod installation can't find the Pod folder. But it is right there.

我是这个制作cocoapods的新手。所以,如果有任何不清楚的地方,请告诉我。我不知道我在这里做错了什么。

I am new to this making cocoapods. So if there is anything that not clear, please let me know. I don't know what I am doing wrong here.

推荐答案

我有同样的问题,我已经能够解决它按照以下步骤操作:

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


  • 更新cocoapod

  • 删除Podfile.lock

  • 再次安装

命令:

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

也许有些不是必需的,但它对我有用(我认为最重要的是删除Podfile.lock)。我希望你也能解决它。

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.

这篇关于pod安装失败,错误:在iOS中安装pod时,`Podfile`需要库(来自`../`)`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆