Cocoapods安装错误

Kyl*_*man 13 cocoapods ios7

这是我的Podfile:

platform :ios, ‘7.0’

pod 'ECSlidingViewController', '~> 2.0.0'
Run Code Online (Sandbox Code Playgroud)

当我在终端中输入pod install时,这是我得到的错误:

[!] Invalid `Podfile` file: /Users/Kyle/Desktop/Testing/Podfile:1: no .<digit> floating literal anymore; put 0 before dot
platform :ios, ‘7.0’
                    ^
/Users/Kyle/Desktop/Testing/Podfile:1: syntax error, unexpected tINTEGER, expecting '('
platform :ios, ‘7.0’
                     ^. Updating CocoaPods might fix the issue.
Run Code Online (Sandbox Code Playgroud)

Podfile中的所有内容都是正确的.我试过"而不是"没有效果.我也删除了小数(点)并移动它.我错过了什么?

在浏览网页后,一位用户建议我的Ruby安装可能出错,但我该如何检查呢?我还验证了我安装了所有Ruby更新:

sudo gem update --system
Run Code Online (Sandbox Code Playgroud)

任何帮助都会很棒,谢谢!

tim*_*him 47

有同样的问题.很难注意到,但如果您使用的是Mac并使用TextEdit编辑Podfile,则引号字符可能已更改.在首选项中关闭"智能引号".

  • @ nimingzhe2008转到编辑 - >替换 - >智能引号确保它未被取消以更新从智能引号开始的已使用文档. (2认同)

Muh*_*rif 25

我有同样的问题以下为我工作.在Podfile的第一行中替换卷曲引号即

platform :ios, ‘7.0’ (Not working)
platform :ios, '7.0' (Working)
Run Code Online (Sandbox Code Playgroud)

您正在使用卷曲引号字符,即'= 0x2018&'= 0x2019.你应该使用'= 0x27的直引号

TextEdit会自动将常规报价转换为智能报价.您可以从以下位置禁用智能引号选项:系统偏好设置 - >键盘 - >取消选中"使用智能引号和破折号"

系统偏好 - >键盘