【问题标题】:How to resolve the Pod install error?如何解决 Pod 安装错误?
【发布时间】:2016-01-22 05:24:09
【问题描述】:

在我安装 Pod 时。它显示这样的错误。如何解决?

您的 Podfile 已对智能引号进行了清理。为避免出现问题 将来,您不应使用 TextEdit 对其进行编辑。如果你不是 使用 TextEdit,您应该在您选择的编辑器中关闭智能引号。

我找到了这样的解决方案:

$ cd <parentDirectory of Podfile>
$ open -a Xcode Podfile`

如果我这样说,它会显示错误:

“Podfile”无法打开,因为它来自身份不明的开发者。

【问题讨论】:

    标签: ios objective-c installation cocoapods


    【解决方案1】:

    请在 Xcode 中编辑您的 Podfile。

    在 Xcode 中打开您的 Podfile。 编辑它。 保存它。

    当您使用 TextEdit 进行 Pod 文件编辑时

    pod ‘Fabric’, ‘~> 1.7.1′    //notice the quotes
    

    用 Xcode 打开 Podfile。

    pod 'Fabric', '~> 1.7.1'  //notice the quotes
    

    从文件夹中删除Podfile.lock

    关闭 Xcode 项目。

    执行pod install

    打开ProjectName.xcworkspace 文件。

    【讨论】:

    • 请清楚地告诉我,我是 iOS 的新手。我在 Xcode 中打开了我的 podfile。我必须编辑和保存。
    • 只需检查 podfile 中的引号,如果引号看起来略微交叉,则将其删除并添加。它应该看起来像 Answer 中的 Second case。
    • 如果此答案有帮助,请将其标记为已接受,以便其他人会发现它有帮助。谢谢
    • 请张贴来自终端的错误日志截图。所以我会明白的。
    猜你喜欢
    • 2020-02-05
    • 2021-02-27
    • 2021-04-12
    • 2019-05-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多