cocoa bean 'Invalid Podfile' 。更新 CocoaPods 可能会解决该问题

标签 cocoapods

这是我的 Podfile

 platform :ios, '6.0'
 pod 'RestKit', '0.21.0’, :inhibit_warnings => true
 pod 'MBProgressHUD’, ‘0.8’
 pod 'Reachability', '3.1.1', :inhibit_warnings => true
 pod 'SDWebImage', '3.4'
 pod 'Facebook-iOS-SDK', '3.12'

我在终端中遇到的错误就像

      Invalid `Podfile` file: /Users/User/Desktop/UserFolder/Projects/hott- 
      ios/Podfile:3: syntax   
      error, unexpected tCONSTANT, expecting end-of-input
      pod 'MBProgressHUD’, ‘~>0.8’, :inhibit_warnings => true
                 ^. Updating CocoaPods might fix the issue.

最佳答案

检查单引号。我数了三个错误的引号。

您的 podfile 应如下所示(请注意 StackOverflow 上突出显示的语法):

platform :ios, '6.0'
pod 'RestKit', '0.21.0', :inhibit_warnings => true
pod 'MBProgressHUD', '0.8'
pod 'Reachability', '3.1.1', :inhibit_warnings => true
pod 'SDWebImage', '3.4'
pod 'Facebook-iOS-SDK', '3.12'

关于 cocoa bean 'Invalid Podfile' 。更新 CocoaPods 可能会解决该问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23996139/

相关文章:

ios - iOS 应用程序的 Podfile 使用

ios - 分发二进制 iOS 框架

Xcode 6.1 和 Cocoapods 集成/依赖错误 - 找不到 -lPods-{Pod Name} 的库

swift2 - CocoaPods v0.39.0 错误与 Facebook SDK v4.7

ios - Cocoapod "error: could not build module ' UIKit'"

xcode - Cocoapods 的 NSLocalizedString

swift 错误 : failed to get module 'My_App' from AST context

ios - Jenkins 在使用 Cocoapods 构建 Xcode 项目时返回 "unknown error -1=ffffffffffffffff"

cocoapods - "pod outdated"输出中的版本号是什么意思?

ios - 当我将它添加到我的项目时,cocoapods 链接器错误