从网上下载的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.
原因是本地未安装CocoaPods,或者没有更新,解决办法:
1、删除lock文件,步骤:Build Phases -->Check Pods Manifest.lock
参考:http://blog.csdn.net/fucuiping_1314/article/details/52061626
2、command + B编译 ,出现: SVProgressHUD/SVProgressHUD.h file not found
3、在终端进入项目的目录:
3.1、先安装cocoapods:
$ gem sources --remove https://rubygems.org/
//等有反应之后再敲入以下命令
$ gem sources -a https://ruby.taobao.org/
$ sudo gem install cocoapods
参考:http://www.code4app.com/article/cocoapods-install-usage
3.2、下载导入pod中托管的类库:
rm -rf MyProject.xcworkspace
rm -rf Podfile.lock
pod install
pod install 命令执行后,会自动生成 MyProject.xcworkspace、Podfile.lock