正在开发的项目中,集成RN,在使用cocoapods 时候,pod install 遇到如下问题:

[!] Unable to find host target(s) for ****Extension. Please add the host targets for the embedded targets to the Podfile.

Certain kinds of targets require a host target. A host target is a "parent" target which embeds a "child" target. These are example types of targets that need a host target:

- Framework

- App Extension

- Watch OS 1 Extension

- Messages Extension (except when used with a Messages Application)

发现:pod --version  1.5.3

解决:降低一个版本试下:

直接执行:pod _1.1.1_ install 

结果:OK (注意:其实可能会引起另外的问题,最好是解决本质问题,参考:'config.h' file not found 解决过程

补充:在Podfile文件使用如下语法引用依赖库:

pod 'AFNetworking' //不显式指定依赖库版本,表示每次都获取最新版本
pod 'AFNetworking', '2.0' //只使用2.0版本
pod 'AFNetworking', '> 2.0' //使用高于2.0的版本
pod 'AFNetworking', '>= 2.0' //使用大于或等于2.0的版本
pod 'AFNetworking', '< 2.0' //使用小于2.0的版本
pod 'AFNetworking', '<= 2.0' //使用小于或等于2.0的版本
pod 'AFNetworking', '~> 0.1.2' //使用大于等于0.1.2但小于0.2的版本,不包含0.1.2
pod 'AFNetworking', '~>0.1' //使用大于等于0.1但小于1.0的版本
pod 'AFNetworking', '~>0' //高于0的版本,写这个限制和什么都不写是一个效果,都表示使用最新版本

CocoaPods 遇到 A host target is a "parent" target which embeds a "child" target 问题解决的更多相关文章

  1. The `XXXX` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods-game-desktop/Pods-game-desktop.release.xcconfig'. This can lead to prob

    The `game-desktop [Release]` target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Po ...

  2. HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)

    IE8报错误: 用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .N ...

  3. BUG笔记:Win XP IE8下HTML Parsing Error: Unable to modify the parent container element before the child

    [Bug描述]Windows XP IE8的某些版本下页面只显示一部分,其余为空白.IE左下角有惊叹号报错标志,点开后显示字符如下: HTML Parsing Error: Unable to mod ...

  4. IE8"HTML Parsing Error:Unable to modify the parent container element before the child element is closed"错误

    一.IE8报下面错误,解决办法:网页错误详细信息消息: HTML Parsing Error: Unable to modify the parent container element before ...

  5. CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target 解决办法

    产生这个问题的原因是最新版本的CocoaPods把Podfile文件的书写格式改变了,官网推荐用如下格式书写: platform :ios, '8.0' use_frameworks! target ...

  6. CocoaPods报错:The dependency `AFNetworking ` is not used in any concrete target

    最近更新了下cocoapods,今天再pod update  就遇到这个错误: 大体意思就是说,库没有用到指定的target. 找了下资料,发现是新版CocoaPods在 Podfile里使用时,必须 ...

  7. CocoaPods报错:The dependency `Alamofire ` is not used in any concrete target

    看到这个错误提示,首先看看自己的版本是不是 OS X EI Capitan,也就是10.10以后的版本,因为这个版本是比较新的版本,网络上找的那些安装cocoapod命令其实有些过时了,特别是创建po ...

  8. CocoaPods报错:The dependency `xxx` is not used in any concrete target

    官网是这样给推荐的: 在创建Podfile的时候,用这种格式使用, platform :ios, '8.0' use_frameworks! target 'MyApp' do pod 'AFNetw ...

  9. cocoapods导入框架出错 The dependency `FMDB` is not used in any concrete target

    问题描述: The dependency `FMDB` is not used in any concrete target 解决办法: 官网是这样给推荐的: 在创建Podfile的时候,用这种格式使 ...

随机推荐

  1. fedora、centos、rhel安装Adobe Flash Player 28

    切换到root用户 添加Adobe Repository Adobe Repository 32-bit x86 rpm -ivh http://linuxdownload.adobe.com/ado ...

  2. SNMP协议利用

    1.安装snmp服务 2.配置snmp服务 运行Services.msc 添加社区public,只读 启动服务 3.在kali运行 Snmpwalk -c public -v 2c IP 即可查看目标 ...

  3. win10 损坏 bios?

    自从前几个月升级为win10后,主板莫名奇妙的就出问题了,遇到3块不同型号2块技嘉b75,1块微信ph67 技嘉b75-ds3v 技嘉b75m-d3v 微星ph67s-c43 ms-7673 1.0 ...

  4. 团队作业——Alpha冲刺 11/12

    团队作业--Alpha冲刺 冲刺任务安排 杨光海天 今日任务:预览界面布局实现,并留下交互接口 明日任务:预览界面中自定义保存的实现 郭剑南 今日任务:尝试解决Python编写程序无法在Android ...

  5. saxbuilder用法

    xml为我们在网络交换数据带来很大方便,在java中可以使用saxbuilder来操作xml格式文件,下面介绍一下saxbuilder的常用方法. import org.jdom.Document; ...

  6. 添加外键式异常 1215-cannot add foreign key constranint

    添加外键时报错,原因是添加外键的表的字段的字段类型不一致 比如我的第一张表id是int类型,添加约束的dep_id是bigint类型,所以报错,只要把两张表添加约束的字段类型改成统一的即可 本人大学生 ...

  7. Mac svn使用学习-4-客户端cli命令详解

    客户端cli的使用 WC:Working Copy 你的工作区 将文件或目录版本化,这样下一次提交到存储库的时候,他们就都会被提交上去.能实现版本化的命令有: add 1.import 是否访问存储库 ...

  8. mysql常用备份命令和shell备份脚本

    备份多个数据库可以使用如下命令:mysqldump -uroot -p123456 --databases test1 test2 test3 > /home/test/dump.sql; 恢复 ...

  9. shiro实战系列(十二)之常用专业术语

    请花 2 分钟来阅读和理解它——这很重要.真的.这里的术语和概念在文档的任何地方都被涉及到,它将在总体上 大大简化你对 Shiro 和安全的理解.   由于所使用的术语使得安全可能令人困惑.我们将通过 ...

  10. Android 将拼接好并加上边框的图片保存到内存卡中

    通过前两篇文章,问们学会了怎样拼接图片.给拼接好的图片加上边框样式,但这还不够,忙活了大半天 终于拼接好并给图片美化了,但是程序一旦推出,之前做的工作都白费了.这时我们会想,能不能把拼接好的图片保存起 ...