CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target
2016-03-25 20:55
441 查看
ex:
CocoaPods再遇困难,前几天电脑重装了系统,所有的开发工具就都装了最新的,当我用CocoaPods的时候,出了一个提示,大概就是我的版本不是 last version,然后给你提示了一个命令,直接复制即可,就是下面这个:
安装cocoapods的预览版本,就会更新下来新的1.0.0.beta.2版本,如下所示:
很高兴啊,更新了新的版本,然而pod install就出错了,悲了个剧!出错如下:
我用的三方库比较多,挺长的,出这个错是告诉我们我们所用的库没有指定target,它不知道用在哪里,所以就给报错了,然后我去了cocoapods的官网看了下,cocoapods官网地址
官网是这样给推荐的:
在创建Podfile的时候,用这种格式使用,
里面的 MyApp 记得替换为自己攻城里面的target。这样就基本OK了,执行pod install / pod update 就都可以了。
有疑问的给我评论或者邮件,每天都会看一下 kamy_shi@163.com
zz http://blog.csdn.net/sjl_leaf/article/details/50506057
<code class="hljs coffeescript has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">The dependency `<span class="javascript" style="box-sizing: border-box;"></span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target The dependency `<span class="javascript" style="box-sizing: border-box;">AFNetworking </span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li></ul>
CocoaPods再遇困难,前几天电脑重装了系统,所有的开发工具就都装了最新的,当我用CocoaPods的时候,出了一个提示,大概就是我的版本不是 last version,然后给你提示了一个命令,直接复制即可,就是下面这个:
<code class="hljs bash has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">sudo</span> gem install cocoapods --pre</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>
安装cocoapods的预览版本,就会更新下来新的1.0.0.beta.2版本,如下所示:
<code class="hljs avrasm has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">Successfully installed cocoapods-<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.0</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.0</span><span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.beta</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.2</span> Parsing documentation for cocoapods-<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.0</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.0</span><span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.beta</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.2</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li></ul>
很高兴啊,更新了新的版本,然而pod install就出错了,悲了个剧!出错如下:
<code class="hljs coffeescript has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;">Updating local specs repositories Analyzing dependencies [!] The dependency `<span class="javascript" style="box-sizing: border-box;">FMDB (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.3</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">SDWebImage (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">3.6</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">AFNetworking (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.3</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.0</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">DACircularProgress (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.2</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.0</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">MBProgressHUD (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">0.8</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">PSTCollectionView (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.2</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.1</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">HPGrowingTextView (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.1</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">ProtocolBuffers (= <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.9</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.3</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">leveldb-library (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.18</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.1</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">SCLAlertView-Objective-C (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">0.7</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.5</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">MWPhotoBrowser (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">1.4</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.1</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">MMMarkdown (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">0.5</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">MJExtension (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.5</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.16</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">MJRefresh (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2.4</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.12</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target. The dependency `<span class="javascript" style="box-sizing: border-box;">Masonry (~> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">0.6</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.3</span>)</span>` <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> used <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">in</span> any concrete target.</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li></ul>
我用的三方库比较多,挺长的,出这个错是告诉我们我们所用的库没有指定target,它不知道用在哪里,所以就给报错了,然后我去了cocoapods的官网看了下,cocoapods官网地址
官网是这样给推荐的:
在创建Podfile的时候,用这种格式使用,
<code class="hljs livecodeserver has-numbering" style="display: block; padding: 0px; background-color: transparent; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; word-wrap: normal; background-position: initial initial; background-repeat: initial initial;"><span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">platform</span> :ios, <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'8.0'</span> use_frameworks! target <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'MyApp'</span> <span class="hljs-built_in" style="color: rgb(102, 0, 102); box-sizing: border-box;">do</span> pod <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'AFNetworking'</span>, <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'~> 2.6'</span> pod <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'ORStackView'</span>, <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'~> 3.0'</span> pod <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'SwiftyJSON'</span>, <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'~> 2.3'</span> <span class="hljs-function" style="box-sizing: border-box;"><span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">end</span></span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; background-color: rgb(238, 238, 238); top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right;"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li></ul>
里面的 MyApp 记得替换为自己攻城里面的target。这样就基本OK了,执行pod install / pod update 就都可以了。
有疑问的给我评论或者邮件,每天都会看一下 kamy_shi@163.com
zz http://blog.csdn.net/sjl_leaf/article/details/50506057
相关文章推荐
- Swift、Objective-C、Cocoa混合编程设置指南
- 在Swift中使用Cocoa的现有设计模式介绍
- Swift使用Cocoa中的数据类型教程
- windows下objective-c的cocoa框架编程,可以有图形界面哟
- CocoaPods版本升级
- Cocoa 之多线程 NSThread
- IOS学习之整体框架类图
- Mac 点击dock图标显示窗口,点击关闭按钮隐藏窗口
- 隐藏窗口里默认按钮的方法NSWindowCloseButton
- cocoa 点击关闭按钮退出应用程序
- 编译错误“The run destination My Mac 64-bit is not valid for Running the scheme '***',解决办法
- cocoa 在dock上添加菜单
- [CS193P] 第一堂課摘要及心得筆記
- [CS193P] 第三堂課摘要及心得筆記
- [CS193P] 第六堂課摘要及心得筆記
- 【热门收藏】iOS开发人员必看的精品资料(100个)——下载目录
- IOS里面一些基础类型的使用点
- 关于IOS 开发 中的一些小技巧
- KVO (NSKeyValueObserving)
- iOS中使用 Reachability 检测网络