当前位置:网站首页>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 xxxxxxxxxxxx为项目目录,直接将项目拖到终端就行
新建Podfile文件
$ vim Podfile输入i进入编辑状态,目前高版本Podfie这样编写
$ platform: ios,'8.0'
$ target 'QZProject' do
$ pod 'SDAutoLayout'
$ end完成后敲esc然后:wq(保存并退出)
最后
$ pod install完成
当遇到一下问题时: 
可以这样解决:
在Podfile文件中加上:
use_frameworks!即可!!!
持续更新
边栏推荐
- [MySQL] detailed explanation of redo log, undo log and binlog (4)
- Pat grade a a1076 forwards on Weibo
- PHP和MySQL获取week值不一致的处理
- C# Serialport的发送和接收
- 围棋智能机器人阿法狗,阿尔法狗机器人围棋
- Under a directory of ext3 file system, subfolders cannot be created, but files can be created
- NTT (fast number theory transformation) polynomial inverse 1500 word analysis
- Li Mu D2L (VI) -- model selection
- arc-gis基础操作3
- 大二上第五周学习笔记
猜你喜欢

异常处理机制二

Two tips for pycharm to open multiple projects

volatile 靠的是MESI协议解决可见性问题?(下)

NTT (fast number theory transformation) polynomial inverse 1500 word analysis

Li Mu D2L (V) -- multilayer perceptron

神经网络与深度学习-6- 支持向量机1 -PyTorch

垂直搜索

2022 Shanghai safety officer C certificate examination questions and mock examination

volatile 靠的是MESI协议解决可见性问题?(上)

李沐d2l(六)---模型选择
随机推荐
Redis principle and use - Basic Features
JVM触发minor gc的条件
Elastic APM安装和使用
What is asynchronous operation
STM32+MFRC522完成IC卡号读取、密码修改、数据读写
【Flutter -- 布局】Align、Center、Padding 使用详解
Zipkin安装和使用
Use of off heap memory
语音聊天app源码——钠斯直播系统源码
C# Serialport的发送和接收
垂直搜索
Vertical search
Canal 的学习笔记
The essence of attack and defense strategy behind the noun of network security
异常处理机制二
JS - DataTables 关于每页显示数的控制
“No input file specified “问题的处理
滑动窗口、双指针、单调队列、单调栈
本地缓存
Zipkin installation and use