React Native解决cocoapods diff: /../Podfile.lock: No such file or directory

运行ios项目,报错

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.

尝试方法:

1、关闭Xcode,重新执行pod install,之后再重新打开Xcode运行。

无效

2、删除以下文件

xcworkspace

Podfile.lock

Pods文件夹

~/Library/Developer/Xcode/DerivedData路径下对应工程的文件夹

然后重新执行pod install

无效

3、

移除cocopods后重新安装

(1)打开终端,运行sudo gem install cocoapods-deintegrate安装快速解除项目cocopods依赖的库

(2)安装成功后,cd到你项目的更目录运行pod deintegrate解除项目cocopods依赖

(3)运行pod install,重新安装cocopods

无效

4、

有效

在工程设置中的 Build Phases 下修改 Check Pods Manifest.lock 的路径、

原:

diff "${PODS_PODFILE_DIR_PATH}/Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null

修改为图中


React Native解决cocoapods diff: /../Podfile.lock: No such file or directory_第1张图片

参考:

https://www.jianshu.com/p/4c3164fe552a

https://blog.csdn.net/dabin12345/article/details/52918369

你可能感兴趣的:(React Native解决cocoapods diff: /../Podfile.lock: No such file or directory)