gpt4 book ai didi

xcode - 在终端中的Podfile上使用Pod Install命令时出错

转载 作者:行者123 更新时间:2023-12-03 08:51:51 24 4
gpt4 key购买 nike

我已经安装了Cocoapods,并使用Atom创建了一个Podfile,其中包含以下几行:

pod ‘Parse’, ‘~> 1.7.1′
pod ‘ParseUI’, ‘~> 1.1.3′

将此文件放入我的Xcode项目根目录后,在Terminal中运行“pod install”。显示如下:

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.



Screenshot added
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.38.2/lib/cocoapods-core/standard_error.rb:87:in `message': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:367:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:315:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.9.1/lib/claide/command.rb:303:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/command.rb:48:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/bin/pod:44:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'

我不确定如果有人可以给我一些建议,我做错了什么,将不胜感激。谢谢。

最佳答案

You shouldn’t use TextEdit to edit the pod file because TextEdit likes to replace standard quotes with more graphically appealing quotes. This can cause CocoaPods to get confused and display errors, so it’s best to just use Xcode or another programming text editor.



文本编辑:

使用TextEdit将为您提供以下内容,
pod ‘Parse’, ‘~> 1.7.1′    //notice the quotes

要在TextEdit中关闭智能引号,请转到
TextEdit > Preferences > New Document > Options

Xcode:

为了获得正确的报价,您应该在打开Podfie时使用Xcode:
pod 'Parse', '~> 1.7.1'

使用Xcode应用程序打开的终端命令:
$ touch Podfile  //OR $ cd <parentDirectory of Podfile>
$ open -a Xcode Podfile

关于xcode - 在终端中的Podfile上使用Pod Install命令时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31832538/

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