最近将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 计时累积超过24小时时继续往上累加

    最近在做一个工具,要求在工具上面加上程序运行的时间,所以做了个计时器 在网上找了很多发现都是24小时制的,超过24小时后就会回0 然后自己根据24小时制修改了一个不停累加时间的 若是想超过24小时后以 ...

  2. iOS时间显示今天昨天

    一.前言 今天无意间想起写这个功能,仔细考虑了一下,其实很简单,整体思路如下: 先获取你所要转换的时间的年月日,然后再获取今天和昨天的年月日,然后对比,进而返回不同的字符串. 二.实现步骤 首先,我们 ...

  3. java按行和列进行输出数据

    package debug; public class Demo9 { public static void main(String[] args) { //输出4行5列星星 //外循环控制行数 // ...

  4. Spring Cloud Eureka 属性作用

    配置参数 默认值 说明 服务注册中心配置 Bean类:org.springframework.cloud.netflix.eureka.server.EurekaServerConfigBean eu ...

  5. Ubuntu18.04安装Tensorflow+cuda+cuDNN

    本文写的比较简单,期间遇到的一些小麻烦,自己不认为成为阻碍,所以没有详细写. 如有疑问可以联系QQ:2922530320 Pycharm Pycharm使用Anaconda Pycharm 在新建项目 ...

  6. YOLO2(1)配置安装win10+openvc2413+VS2013 简单测试官例

    参考官网 https://github.com/AlexeyAB/darknet#how-to-compile-on-windows https://github.com/AlexeyAB/darkn ...

  7. day12 Python数字,字符串,列表,元祖,字典总结

    一.数字 int() 二.字符串 replace/find/join/strip/startswith/split/upper/lower/format tempalte = "i am { ...

  8. java 实现serialVersionUID

    文章转自  https://www.cnblogs.com/duanxz/p/3511695.html 作用 serialVersionUID适用于Java的序列化机制.简单来说,Java的序列化机制 ...

  9. Java基础之多线程篇(线程创建与终止、互斥、通信、本地变量)

    线程创建与终止 线程创建 Thread类与Runnable接口的关系 public interface Runnable { public abstract void run(); } public ...

  10. <数据结构与算法分析>读书笔记--运行时间中的对数及其分析结果的准确性

    分析算法最混乱的方面大概集中在对数上面.我们已经看到,某些分治算法将以O(N log N)时间运行.此外,对数最常出现的规律可概括为下列一般法则: 如果一个算法用常数时间(O(1))将问题的大小削减为 ...