最近将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. 安全之路 —— 借助DLL进行远程线程注入实现穿墙与隐藏进程

    简介        大多数后门或病毒要想初步实现隐藏进程,即不被像任务管理器这样典型的RING3级进程管理器找到过于明显的不明进程,其中比较著名的方法就是通过远程线程注入的方法注入将恶意进程的DLL文 ...

  2. mysqld_safe启动服务器总结

    mysqld_safe是服务端工具,用于启动mysqld,并且是mysqld的守护进程,mysqld_safe加&在后台运行$BASEDIR/bin/mysqld_safe & 优点就 ...

  3. git merge 步骤

    这两天用git比较多,自己学习的过程踩了不少误区,特意记录下来. 当多人合作开发使用git作为代码管理仓库时,要注意自己的更新不能冲掉别人的更新,因为自己一开始不了解的时候就出现了这种情况.首先一定要 ...

  4. 4.9Python数据类型(5)列表(新版)

    前言 列表是一种python类似数组的数据结构,操作灵活,可存储多种类型的数据. 目录 1.列表的基础知识 2.列表的增删改查并操作 3.列表的其他操作 4.基本方法表 (一)列表的基础知识 1.说明 ...

  5. [经验总结] 在 windows 命令窗口中运行 python 脚本时提示 ModuleNotFoundError: No module named 'xxx'

    先给出的代码和目录结构 获取CPU代码如下: # -*- coding:utf-8 -*- ''' Created on Sep 10, 2018 @author: ''' import sys im ...

  6. 布局:高度已知,布局一个三栏布局,左栏和右栏宽度为200px,中间自适应

    需求:高度已知为200px,写出三栏布局,左栏和右栏各位200px,中间自适应,如下图所示: 方法一:float浮动布局 原理是:定义三个区块,需要注意的是中间的区块放在右边区块的下面,统一设置高度为 ...

  7. socket 总结

    网络编程之进程:http://www.cnblogs.com/1a2a/p/7428759.html 网络编程之进阶:http://www.cnblogs.com/1a2a/p/7444446.htm ...

  8. JDBC驱动-MySQL

    <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</a ...

  9. ORB-SLAM2(2) ROS下配置和编译

    1配置USB相机 1.1网友参考: http://www.liuxiao.org/2016/07/ubuntu-orb-slam2-%E5%9C%A8-ros-%E4%B8%8A%E7%BC%96%E ...

  10. Apache Ant安装 验证

    1.下载Apache Ant 去官网下载ant,官网地址:http://ant.apache.org/ 我下载的是apache-ant-1.10.1-bin.zip 直接解压,放到制定目录下,如C:\ ...