正在开发的项目中,集成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. ElasticStack系列之十八 & ElasticSearch5.x XPack 过期新 License 更新

    摘要 当你某一天打开 Kibana 对应的 Monitoring 选项卡的时候,发现提示需要下载新的 license,旧的 license 已经过期了,试用期为30天,如果不是很需要其他的复杂监控.报 ...

  2. October 18th 2017 Week 42nd Wednesday

    Only someone who is well-prepared has the opportunity to improvise. 只有准备充分的人才能够尽兴表演. From the first ...

  3. python批量连接mysql

    注释:脚本(gomysql.py)需要进一步优化,初学者,努力中 首先配置需要执行的dbip.ini列表,格式如下 S1  192.168.0.5   3306  dbusername dbpassw ...

  4. C#实现的协同过滤算法

    using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace SlopeOn ...

  5. 使用Winform程序作为WCF服务的宿主

    如果我们自己新建一个WCF服务库,生成了dll文件.那我们需要创建一个宿主程序,在本例中我们新建一个Winform程序作为WCF的宿主程序. 在网上很多教程里对创建过程写的很模糊,错误也很多.本文是作 ...

  6. 2.3.2 EditText(输入框)详解

    本节引言: 上一节中我们学习了第一个 UI控件TextView(文本框),文中给出了很多实际开发中可能遇到的一些需求 的解决方法,应该会为你的开发带来便利,在本节中,我们来学习第二个很常用的控件Edi ...

  7. Inter exchange Client Address Protocol (ICAP)- 互换客户端地址协议

    https://github.com/ethereum/wiki/wiki/Inter-exchange-Client-Address-Protocol-(ICAP) Transferring fun ...

  8. Cannot find module '../lib/utils/unsupported.js'

    运行npm run clean出错: throw err; ^ Error: Cannot find module '../lib/utils/unsupported.js' at Function. ...

  9. 测试udp服务的端口是否可用

    测试tcp服务的端口是否可用,可以使用: telnet ip port   但是如果这个用在upd服务上,就会报错, 因为telnet走的是tcp协议, 比如说192.168.80.131在8888端 ...

  10. Python 函数(一)

    Python3 函数(基本概念) 1.概念: 函数是组织好的,可重复使用的,用来实现单一,或相关联功能的代码段:通过函数,可以对特定功能的代码进行封装,实现代码的复用. 2. 5.参数传递 (1) P ...