gpt4 book ai didi

ios - 无法安装 podfile

转载 作者:行者123 更新时间:2023-11-28 21:50:38 28 4
gpt4 key购买 nike

我已经安装了 Cocoapods,运行 pod setup,创建了一个 pod 文件,然后当我尝试安装它时,出现以下错误。

    fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface/error_report.rb:13:in `report': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:58:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'

这是我的 podfile 中的内容

platform :ios, '7.0'
pod ‘pop’, ‘~> 1.0′

我卸载了 cocoa pods 并重新安装,但没有成功。甚至尝试了以下解决方案,该解决方案适用于在 pod 安装方面遇到问题但无济于事的其他人。

$ sudo rm -fr ~/.cocoapods/repos/master
$ pod setup

有什么想法吗?

谢谢

最佳答案

这发生在我用 Textedit 编辑我的 Podfile 时,而不是正常的单引号,有反引号,即:

我明白了:'而不是这个:'

关于ios - 无法安装 podfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28485274/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com