Mac OS X 10.10(yosemite)更新后,cocoapods出错, 及cocoapods更新至0.34后, 错误情况整理
来源:互联网 发布:淘宝查询 编辑:程序博客网 时间:2024/04/30 03:52
1:Mac升级10.10后,执行pod install出错如下
1
2
3
4
5
6
7
8
9
10
11
QTX-Will-mini:NewHishop willbin$ pod install
[!] Unable to load a specification
for
the plugin `/Library/Ruby/Gems/2.0.0/gems/cocoapods-
try
-release-fix-0.1.2`
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/user_interface/error_report.rb:13:in `report': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:63:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:50:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/bin/pod:33:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
解决方案:卸载0.1.2版本, 再安装最新版本
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
QTX-Will-mini:NewHishop willbin$ sudo gem uninstall cocoapods-
try
-release-fix
Password:
Select gem to uninstall:
1. cocoapods-
try
-release-fix-0.1.1
2. cocoapods-
try
-release-fix-0.1.2
3. All versions
> 3
Successfully uninstalled cocoapods-
try
-release-fix-0.1.1
Successfully uninstalled cocoapods-
try
-release-fix-0.1.2
QTX-Will-mini:NewHishop willbin$ sudo gem install cocoapods
Successfully installed cocoapods-0.34.4
Parsing documentation
for
cocoapods-0.34.4
1 gem installed
2:安装成功后, 再执行 pod install 还是出错, 如下
1
2
3
4
5
6
7
8
9
10
QTX-Will-mini:NewHishop willbin$ pod install
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/user_interface/error_report.rb:13:in `report': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:63:in `report_error'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:300:in `handle_exception'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:274:in `rescue in run'
from /Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:264:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:50:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/bin/pod:33:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
解决方案: podfile格式变化了. 要用新格式.
3: podfile格式变化
以前的podfile格式如下
1
2
platform :ios,
'7.0'
pod
'AFNetworking'
以下是官网的podfile介绍
http://guides.cocoapods.org/syntax/podfile.html
http://guides.cocoapods.org/using/the-podfile.html
The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. The Podfile always creates an implicit target, named default
, which links to the first target of the user project.
A podfile can be very simple:
1
2
source
'https://github.com/CocoaPods/Specs.git'
pod
'AFNetworking'
,
'~> 1.0'
An example of a more complex podfile can be:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
source
'https://github.com/CocoaPods/Specs.git'
platform :ios,
'6.0'
inhibit_all_warnings!
xcodeproj
'MyProject'
pod
'ObjectiveSugar'
,
'~> 0.5'
target :test
do
pod
'OCMock'
,
'~> 2.0.1'
end
post_install
do
|installer|
installer.project.targets.each
do
|target|
puts
"#{target.name}"
end
end
ps:podfile中尤其要注意标点符号.
0 0
- Mac OS X 10.10(yosemite)更新后,cocoapods出错, 及cocoapods更新至0.34后, 错误情况整理
- cocoapods 环境配置及使用 (MAC OS X 10.11 更新后的新的安装方式)
- 升级10.10 Yosemite 后,cocoapods 出现错误(解决方案)
- 升级10.10 Yosemite 后,cocoapods 出现错误(解决方案) -
- 升级10.10 Yosemite 后,cocoapods 出现错误解决方案
- 关于更新OS X EI后下得Xcode7下面的 cocoapods安装与使用
- Mac OS X 更新到10.11后cocoapods安装出现的问题(- bad response Not Found 404 (http://ruby.taobao.org/latest_spe)
- MAC OS Cocoapods安装更新实战
- mac os升级到OS X Yosemite后修复mysql
- 更新到10.11后 cocoapods 重装问题
- 更新系统后cocoapods的使用问题
- 更新系统后cocoapods的使用问题
- Mac上更新Ruby及安装 CocoaPods
- 修复CocoaPods更新错误
- mac系统升级到OS X Yosemite后Wireshark无法使用
- mac系统升级到OS X Yosemite后Wireshark无法使用
- Mac OS X 10.10更新及体验
- Xcode7使用CocoaPods不工作, 在更新 Mac OS X EI Capitain之后
- 定制Android-Lint检查问题的现有规则
- Quartz 2D 绘图d
- js定时器setInterval()的使用
- 黑马程序员 Java学习总结之StringBuilder和StringBuffer
- 这个冬天怎么过
- Mac OS X 10.10(yosemite)更新后,cocoapods出错, 及cocoapods更新至0.34后, 错误情况整理
- iOS开发-NSLog不打印设置
- TI 66AK2H14 Multicore DSP+ARM KeyStone II System-on-Chip (SoC)技术资料翻译(三)
- 我在家里过冬天吗
- Saliency Detection on Light Field
- 的设计费离开家萨连科
- iOS8 WebKit库之——WKWebView篇
- 隔阂二工大放个假回复如图仿古街
- Symmetric Tree