pod 问题

[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

尝试按提示的方法

pod repo add master https://github.com/CocoaPods/Specs.git

依旧报错


Paste_Image.png

运行 pod setup 依旧报错


Paste_Image.png

解决办法:
原因修改了Xcode的路径后,找不到Xcode,解决办法:
1、进入/users/你的用户名/.cocoapods/,删除master文件夹
2,sudo xcode-select -switch /Applications/Xcode.app/
3、pod setup
等待很久


等待

依旧失败


pod 问题_第1张图片
依旧失败

依然没有解决...
[!] Pods written in Swift can only be integrated as frameworks; add `use_frameworks!` to your Podfile or target to opt into using it. The Swift Pods being used are: ReactiveCocoa, ReactiveSwift, and Result

要添加的这个库 不支持swift导致
解决办法:
在podfile里面添加 use_frameworks!


error: failed to push some refs to '[email protected]:SherlockQi/dayByDay.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

原因:
GitHub远程仓库中的README.md文件不在本地仓库中。
解决方案:

$ git pull --rebase origin master
$ git push -u origin master

当在update或install时遇到这个问题:
Unable to find a specification for `xxxxx (~> 1.x.x)` depended upon by Podfile.

只需要把当前Pod的目录清理一下就行了。在终端执行以下命令:

pod repo remove master  
pod setup

setup成功后执行install或update即可

你可能感兴趣的:(pod 问题)