gpt4 book ai didi

ios - 安装 CocoaPods 后的 Xcode 错误 - 没有这样的文件或目录

转载 作者:行者123 更新时间:2023-11-29 00:01:26 24 4
gpt4 key购买 nike

我在尝试将 Pod 添加到我的 Cordova iOS 项目时遇到一些错误

我在 Xcode 中看到的错误是:

diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

我根据在其他 Stackoverflow 上看到的信息尝试了以下操作。

1:关闭 Xcode 并运行 pod install

2:pod更新

3:删除并重新安装 cocoa pod

4:创建一个新项目

我的项目具有 /platform/ios 结构,我正在尝试安装 Firebase。这就是我安装 Pod 所做的事情

1:在上面的文件夹中 -- pod init2:编辑podfile并添加firebase podfile 内容

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'RandstadJobs' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

# Pods for RandstadJobs
pod 'Firebase/Core'
end

3:运行 pod install

4:干净地打开 Xcode 并构建

我看到了 Podfile.lock 和 Manifest.lock 文件。它们位于文件夹中,,

/platform/ios/Podfile.lock and /platform/ios/pods/manifest.lock

这是 Xcode 中的构建阶段设置

diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
if [ $? != 0 ] ; then
# print error to STDERR
echo "error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation." >&2
exit 1
fi
# This output is used by Xcode 'outputs' to avoid re-running this script phase.
echo "SUCCESS" > "${SCRIPT_OUTPUT_FILE_0}"

路径似乎没有设置。

您能否提供一些提示以及如何解决此问题

谢谢

最佳答案

通过执行以下操作,我能够通过错误:

在 Xcode build设置中添加 2 个用户定义变量

1: PODS_ROOT = $(SRCROOT)/PODS

2: PODS_PODFILE_DIR_PATH = $(SRCROOT)

然后清理项目并编译

关于ios - 安装 CocoaPods 后的 Xcode 错误 - 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49382961/

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