最近将ReactNative业务集成进现有APP项目中,出现了几个具有代表性的问题,下面记录一下

问题1、

[!] CocoaPods could not find compatible versions for pod "React/RCTText":
  In Podfile:
    React/RCTText (from `./RN/node_modules/react-native`)
Specs satisfying the `React/RCTText (from `./RN/node_modules/react-native`)` dependency were found, but they required a higher minimum deployment target.
 
解决:将 platform :ios, '8.0' 改成:platform :ios, '9.0' 即可。
 
问题2、
[!] 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)
 
解决过程1:网上有人说将cocoapods 降低一个版本,可以解决问题
 
$ gem list  查看安装的cocoapods 版本都有哪些
cocoapods (1.5.3, 1.3.1, 1.1.1)
$ pod _1.3.1_ install (无效)
$ pod _1.1.1_ install   (有效解决,但是会带来'config.h' file not found问题,并且无论怎么配置都没有用,项目始终报错。解决方案可以参考:React Native 'config.h' file not found 问题、configure: error: C compiler cannot create executables问题解决过程记录
 
解决过程2:经过思考问题应该不在podfile,想从Extension 入手解决。
 
   1、 打开XCode ,选择HOST target
   2、打开 target's 'General' 
   3、向下找到'Embedded Binaries',确定下 Extension target 是不是存在,如果存在的话,将其删掉,重新添加。如果不存在的话,需要添加。

 
之后,重新pod install 安装即可,一直困扰的'config.h' file not found 问题也解决了。

'config.h' file not found 解决过程的更多相关文章

  1. React Native 'config.h' file not found 问题、 'glog/logging.h' file not found 问题、configure: error: C compiler cannot create executables问题解决过程记录

    1.在github 上面 git clone 一个RN 项目代码,npm install (yarn)后,准备运行iOS工程,发现'config.h' file not found ,恶心!!! 百度 ...

  2. iOS开发--libxml/HTMLparser.h file not found 解决方法 (libxml.dylib错误处理)

    点击左边项目的根目录,再点击右边的Build Settings,手工输入文字:“Header search paths”,然后单击(或双击,点击弹出面板下面的“+”号进行添加)“ Header sea ...

  3. Xcode - 'openssl/opensslconf.h' file not found解决

    点击Build Settings搜索Header Search Paths,添加$(SRCROOT)/目录/Alipay

  4. MBProgressHUD.h file not found

    MBProgressHUD框架,怎么我导入MBProgressHUD+MJ.h会报错.(即MBProgressHUD+MJ根本不存在),我看其他人的视屏又可以导入 MBProgressHUD.h fi ...

  5. Ubuntu下 fatal error: Python.h: No such file or directory 解决方法

    参考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such file or ...

  6. numa.h:No such file or directory 解决方法

    参考: numa.h:No such file or directory numa.h:No such file or directory 解决方法 Ubuntu: $ apt-get install ...

  7. UI进阶 XML解析适配 'libxml/tree.h'file not found 错误解决办法

    Xcode 'libxml/tree.h'file not found 错误解决办法

  8. Mac下安装第三方模块报错:‘sqlfront.h‘ file not found的解决办法

    1.软件环境: mac环境:10.11.6(15G31) python: 3.6 2.问题: sudo pip install pymssql 后出现下面问题: fatal error: 'sqlfr ...

  9. mwc config.h 中文注释

    #ifndef CONFIG_H_ #define CONFIG_H_ /*************************************************************** ...

随机推荐

  1. Linux下内存查看命令

    在Linux下面,我们常用top命令来查看系统进程,top也能显示系统内存.我们常用的Linux下查看内容的专用工具是free命令. Linux下内存查看命令free详解: 在Linux下查看内存我们 ...

  2. 5.3Python函数(三)

    目录 目录 前言 (一)装饰器 ==1.简单的装饰器== ==2.修饰带参数函数的装饰器== ==3.修饰带返回值函数的装饰器== ==4.自身带参数的装饰器== (二)迭代器 (三)生成器 ==1. ...

  3. Ubuntu 12.10 Tty (字符终端) 显示中文,和字体大小设置

    Tty通过修改默认的中文编码字符,和安装zhcon都无法显示中文.可安装fbterm来显示中文,命令:sudo apt-get install fbterm安装即可,进入Tty: (Ctrl+Alt+ ...

  4. January 21st, 2018 Week 3rd Sunday

    Your attitude, not your aptitude, will determine your altitude. 决定你人生高度的,不是你的才能,而是你的态度. Actually, at ...

  5. 建立标准编码规则(四)-C#编码规范分类及实现

    1 现实中的问题 在任何一个公司,每个程序员编写的习惯可能都是不一样的,大到命名空间,小到变量的名字.甚至,我们去github,里面的大牛每个开源的项目的命名规则可能都不一样. 我们通常会遇到下面的问 ...

  6. [bug] 验证selenium的显式和隐式等待而发现的一个低级错误

    隐式等待:如果在规定时间内网页加载完成,则执行下一步,否则一直等到时间截止,然后执行下一步.按照这说法举了个例子为啥不会按照预期执行了,难不成是这个定义有问题(~~~~~直接否定不是定义的问题,相信它 ...

  7. Appium1.9.1 之 Desired Capabilities 释疑

    服务关键字 Desired Capabilities在启动session的时候是必须提供的. Desired Capabilities本质上是以key value字典的方式存放,客户端将这些键值对发给 ...

  8. NGINX 安装于配置

    just a simple example, for more information -> http://nginx.org/en/docs/.1.vi /etc/yum.repos.d/ng ...

  9. swift的类型描述符

    Metatype Types A concrete or existential metatype in SIL must describe its representation. This can ...

  10. ajax json 表格排序,分页,自己定义每页数量

    ajax json 表格排序.分页,自己定义每页数量  点击表头能够排序.依照升序或者降序,另外支持多列排序 设置每页数量 演示   XML/HTML Code <table id='examp ...