很多朋友在使用cocoapods时都会遇到下面这些问题,为了方便大家更快的解决问题,我总结了如下一些问题的解决办法,希望能帮助大家!
错误1
[!] Invalid `Podfile` file: syntax error, unexpected end-of-input, expecting keyword_end.
解决方案:在Podfile的末尾添加 end
错误2
Could not automatically select an Xcode project. Specify one in your Podfile like so:xcodeproj 'path/to/Project.xcodeproj'
解决方案:在Podfile文件里指定一下工程目录就行了
xcodeproj 'Demo/Demo.xcodeproj'
错误3
但是如果cocoapods版本为(1.0.0)的话,可能会有以下警告
[!] xcodeproj was renamed to `project`. Please use that from now on.
解决方案:这时只需要把xcodeproj改为 project就行了
project 'Demo/Demo.project'
错误4
build diff: /../Podfile.lock: No such file or directory
解决方案:在工程设置中的Build Phases下删除Check Pods Manifest.lock及Copy Pods Resources
错误5
Unable to find the Xcode project `/Volumes/BIAO/iOS/code/MBWB.xcodeproj` for the target `Pods`.
解决方案:在Podfile中 将 project 'Demo/Demo.project’ 改成 project 'Demo.project'
错误6
当写在Podfile文件中的第三方框架,不能使用,找不到时
解决方案:查看Pods文件夹,是否下载了所需要的第三方框架,没有的话就 pod update
错误7
The dependency `AFNetworking (~> 3.0)` is not used in any concrete target.
解决方案:在Podfile中添加target‘项目名'do (如 target 'Demo' do )
错误8
Target 'Pods-....' of project 'Pods' was rejected as an implicit dependency for 'Pods_....framework' because its architectures 'x86_64' didn't contain all required architectures 'i386 x86_64
解决方案:Build Settings-》Build Active Architecture Only-》Debug的Yes改为No 如果 报错时时NO,就将No改为Yes !
错误9
clang: error: no such file or directory: '/Work/git/iOS/G6/G6/Tools/SDWebImage/SDWebImageManager.m'
clang: error: no input files