当前位置:网站首页>cocoapods的安装和使用
cocoapods的安装和使用
2022-07-26 09:22:00 【~轻舟~】
今天在安装cocoapods的时候出现的情况:
首先安装cocoapods执行命令行:sudo gem install cocoapods
会出现这个错误:
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - connect(2) (https://rubygems.org/quick/Marshal.4.8/cocoapods-0.37.1.gemspec.rz)
ERROR: Possible alternatives: cocoapods
这是因为service被墙了,要换一个sources:
gem sources --remove https://rubygems.org/
gem sources -a http://ruby.taobao.org/
gem sources -l
如果打印出来的东西是:
http://ruby.taobao.org
那么再执行安装cocoapods命令:
sudo gem install cocoapods
然后你就会看到安装进程了,那么接下来就恭喜你完成了!!!
接下来新建一个项目QZProject
$ cd xxxxxx
xxxxxx为项目目录,直接将项目拖到终端就行
新建Podfile文件
$ vim Podfile
输入i进入编辑状态,目前高版本Podfie这样编写
$ platform: ios,'8.0'
$ target 'QZProject' do
$ pod 'SDAutoLayout'
$ end
完成后敲esc然后:wq(保存并退出)
最后
$ pod install
完成
当遇到一下问题时:
可以这样解决:
在Podfile文件中加上:
use_frameworks!
即可!!!
持续更新
边栏推荐
- Windows backs up the database locally by command
- 对象型的集合按某个属性的值进行去重
- (2006,Mysql Server has gone away)问题处理
- opencv图像处理
- 会议OA项目(三)---我的会议(会议排座、送审)
- “could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32” 问题处理
- Elastic APM installation and use
- 布隆过滤器
- OFDM 十六讲- OFDM
- 【Mysql】认识Mysql重要架构(一)
猜你喜欢
【Mysql】redo log,undo log 和binlog详解(四)
分布式跟踪系统选型与实践
Sending and receiving of C serialport
语音聊天app源码——钠斯直播系统源码
服务器内存故障预测居然可以这样做!
Zipkin安装和使用
Qtcreator reports an error: you need to set an executable in the custom run configuration
redis原理和使用-基本特性
Server memory failure prediction can actually do this!
会议OA项目(三)---我的会议(会议排座、送审)
随机推荐
I'm faded
Innovus is stuck, prompting x error:
HBuilderX 运行微信开发者工具 “Fail to open IDE“报错解决
[shutter -- layout] detailed explanation of the use of align, center and padding
Advanced mathematics | Takeshi's "classic series" daily question train of thought and summary of error prone points
NTT(快速数论变换)多项式求逆 一千五百字解析
838. 堆排序
JS closure: binding of functions to their lexical environment
原根与NTT 五千字详解
Tornado multi process service
redis原理和使用-安装和分布式配置
a-table中的rowSelection清空问题
jvm命令归纳
MySQL 强化知识点
volatile 靠的是MESI协议解决可见性问题?(上)
Pat grade a a1013 battle over cities
(2006, MySQL server has gone away) problem handling
[online problem] timeout waiting for connection from pool problem troubleshooting
2022 Shanghai safety officer C certificate examination questions and mock examination
PHP 之 Apple生成和验证令牌