最近将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. 转 让Python在Android系统上飞一会儿

    让Python在Android系统上飞一会儿 地址: http://blog.csdn.net/ccwwff/article/details/6208260

  2. Window 由于未经处理的异常,进程终止。

    今天遇到了一个程序停止的问题: 应用程序: BussinessService.exe Framework 版本: v4.0.30319 说明: 由于未经处理的异常,进程终止.异常信息: System. ...

  3. 怎样从本地删除git远程仓库里面的文件

    git是大家通用的一种版本控制系统,便捷高效,各种命令需要牢记,今天小渔介绍给大家的是git的删除命令,即将文件从远程仓库中删除的操作. 方法/步骤     首先,我们打开自己的本地GIT仓库,在根目 ...

  4. Redis的配置和使用

    下载Redis:  https://github.com/dmajkic/redis/downloads 学习地址:http://bbs.paris8.org/viewthread.php?tid=6 ...

  5. for-in和for-of,forEach和Map

    for-in和for-of 1. for-in循环实际是为循环”enumerable“对象而设计的,是用来循环带有字符串key的对象的. 使用for in会遍历数组所有的可枚举属性,包括原型.所以fo ...

  6. go标准库的学习-mime/multipart

    参考:https://studygolang.com/pkgdoc 导入方式: import "mime/multipart" multipart实现了MIME的multipart ...

  7. java程序应为CRT登录时启动未设置编码,造成启动乱码

    1.以下提供CRT连接程序设置编码脚本,后缀为“.vbs” # $language = "VBScript"# $interface = "1.0" Sub M ...

  8. ORA-01031: insufficient privileges 错误解决

    OS:linux redhat5.5  32bit 数据库:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 1.问题描述:该数据库监 ...

  9. Linux系统中将普通用户添加到sudoers

    我们经常会在普通用户下用到sudo命令,为了不用频繁切换root用户,我们可以将普通用户添加到sudoers里面.Linux默认是没有将用户添加到sudoers列表中的,需要root手动将账户添加到s ...

  10. IDEA Junit4配置

    一.安装JUnitGenerator V2.0. 1.通过网络安装.如下 2.手动下载插件安装.插件下载:https://plugins.jetbrains.com/idea/plugin/3064- ...