[!] No `Podfile' found in th

作者: honey缘木鱼 | 来源:发表于2018-02-06 15:22 被阅读54次

从网上下载的参考项目,运行时遇到的错误如下:

diff: /../Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 

错误显示

根据提示,在终端直接执行:pod install,出现错误如下:

错误显示

看到问题出现,感觉自己好傻,都没有创建Podfile,如果没有创建Podfile

文件将无法安装, CocoaPods都不知道改安装说明, 怎么去安装呢,

所以按照步奏来一步一步操作:

1.cd到自己的项目目录下(cd +空格+直接拖拽项目到终端)

2.vim Podfile(创建Podfile)

出现以下代码(配置文件,表示成功):

source'https://github.com/CocoaPods/Specs.git'

platform:ios,'8.0'

inhibit_all_warnings! 

target '工程名' do 

pod 'AFNetworking', '~> 2.6.0'

end

然后保存退出

esc

:wq

执行pod install

完美解决No `Podfile' found in the project directory.的问题。

相关文章

网友评论

本文标题:[!] No `Podfile' found in th

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