正在开发的项目中,集成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. MySQL安装及初步配置.md

    MySQL 安装脚本 #!/bin/bash MYSQL_BASEDIR=/usr/local/mysql MySQL_DATADIR=/data/mysql SERVER_ID=`hostname ...

  2. Netty入门(四)ByteBuf 字节级别的操作

     Netty 中使用 ByteBuf 代替 Java NIO 提供的 ByteBuffer 作为字节的容器. 一.索引 ByteBuf 提供两个指针变量支持读和写操作,读操作使用 readerInde ...

  3. 2.3.2 EditText(输入框)详解

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

  4. 爬虫header和cookie

    def on_start(self): self.crawl('http://bbs.byr.cn/board/Python', headers={'X-Requested-With': 'XMLHt ...

  5. day39

    今日内容: 1.对于表,库,记录的基本操作 2.数据库引擎的了解 3.表的详细 4.数据类型的掌握 1.回顾昨日对于表,库,记录的基本操作 库 增: create database mydb2; 删: ...

  6. mysql的常用优化知识

    索引类型:主键索引,唯一索引,联合索引,普通索引,全文索引 建立索引: create index index_name on table(field_name); 删除索引: drop index i ...

  7. IDEA插件——lombok的简单使用

    一.介绍 lombok是一个可以通过注解来简化许多繁琐的get.set以及构造函数等的工具.它可以让我们在代码编写的时候省去代码,而在编译生成的字节码中生成相应的字节码! 官网:https://pro ...

  8. .net 设置Webbowser 版本

    .net 里的Webbowser控件默认情况是用IE7来渲染 可修改注册表试用是最新的版本来渲染: using System; using System.Collections.Generic; us ...

  9. 2017-2018 Exp9 网络欺诈技术防范 20155214

    目录 Exp9 网络欺诈技术防范 实验内容 Webgoat General Access Control Flaws Crossing-Site Scripting Injection Flaws 知 ...

  10. 2017-2018-2 20155231《网络对抗技术》实验五: MSF基础应用

    2017-2018-2 20155231<网络对抗技术>实验五: MSF基础应用 实践目标 掌握信息搜集的最基础技能与常用工具的使用方法. 实验内容 (1)各种搜索技巧的应用 比如IP2L ...