Cocoapods 使用常见错误
来源:互联网 发布:网络爸爸手机版下载 编辑:程序博客网 时间:2024/06/06 07:37
1、安装或更新Cocoapods时提示没权限
$ gem install cocoapodsFetching: cocoapods-core-0.38.2.gem (100%)ERROR: while executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
解决办法:在命令行前加入 sudo
$ sudo gem install cocoapodspassword:Fetching: cocoapods-core-0.38.2.gem (100%)
2、安装或更新第三方库时提示找不到库
$ pod installAnalyzing dependencies[!] Unable to find a specification for 'AfNetworking (~> 2.0)'
原因:要么是安装完Cocoapods后没执行pod setup,要么就是pod setup失败
解决办法:清除后,重新 setup,执行以下命令
$ pod repo remove master$ pod setup
3、安装或更新第三方库时卡主或超慢
$ pod installUpdating local specs repositories
或
$ pod installAnalyzing dependencies
原因:被墙了
解决办法:使用以下命令进行 install 或 update
$ pod install --verbose --no-repo-update$ pod update --verbose --no-repo-update
4、安装或更新第三方库时出现如下警告
[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
原因:
1、不要使用文本编辑去编辑Podfile文件,使用Xcode编辑,或者使用终端敲命令去编辑。
2、Podfile 的内容语法格式有问题
5、安装或更新第三方库时出现如下错误
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target
ParentPortal
toPods/Target Support Files/Pods/Pods.debug.xcconfig
or include thePods/Target Support Files/Pods/Pods.debug.xcconfig
in your build configuration.[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target
ParentPortal
toPods/Target Support Files/Pods/Pods.release.xcconfig
or include thePods/Target Support Files/Pods/Pods.release.xcconfig
in your build configuration.
解决办法:修改Configurations为None,如下图所示
6、OSX系统升级到10.11后,无法使用 Cocoapods 命令
$ -bash: pod: command not found
解决办法:
$ sudo install -n /usr/local/bin cocoapods
之后 pod 命令就可以正常使用了
- Cocoapods 使用常见错误
- CocoaPods 安装 使用及常见错误
- cocoapods常见错误
- cocoapods:常见错误总结
- cocoapods:常见错误总结
- CocoaPods--常见错误
- cocoapods:常见错误总结
- cocoapods:常见错误总结
- cocoapods常见错误
- IOS开发-CocoaPods安装和使用教程及常见错误
- cocoapods的更新常见错误
- CocoaPods 的常见使用问题
- CocoaPods安装流程以及常见错误
- cocoapods:常见错误总结+Mac OS 10.11
- CocoaPods安装以及常见错误总结
- 使用cocoapods时常见错误
- 使用cocoapods时常见错误
- 使用cocoapods时常见错误
- zookeeper工作原理、安装配置、工具命令简介
- 未来有几种?聊聊气候情景(climate scenarios)的故事
- iOS利器——相关工具
- 给 Android 开发者的 RxJava 详解
- python入门系列8―——I/O
- Cocoapods 使用常见错误
- Sublime Text 3 配置浏览器预览路径 localhost
- 使用zixing二维码扫描,扫描时被扫描的二维码图片变形或者按比例拉伸
- PHP-淘宝店内关键字搜索
- elasticsearch 索引 red 状态恢复 green
- freemarker自动生成复杂word
- caffe的Matlab接口的使用方法以及会出现的问题
- FFMPEG的高危漏洞
- Android开发工具类