ireading demo RN工程配置

代码地址

https://github.com/attentiveness/reading

配置步骤:

1.报错代码

Command /bin/sh failed with exit code 1

解决方案:

项目->Build Phases->Bundle React Native code and images -> 勾选 Run script only when installing

2.报错代码:

'boost/iterator/iterator_adaptor.hpp' file not found

解决方案:

2.1删除 你本地的nodemodules文件夹

2.2把你本地的page.json代码清空粘上如下代码

{
  "name": "reading",
  "version": "2.1.0",
  "description": "iReading App Write In React-Native",
  "license": "Apache-2.0",
  "repository": {
    "type": "git",
    "url": "git@github.com:attentiveness/reading.git"
  },
  "engines": {
    "node": ">=4"
  },
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest",
    "lint": "eslint app --fix",
    "format": "find app -name '*.js' | xargs prettier --write --single-quote"
  },
  "dependencies": {
    "leancloud-storage": "3.0.4",
    "lodash": "^4.17.4",
    "moment": "^2.18.1",
    "react": "16.0.0-alpha.6",
    "react-native": "0.44.3",
    "react-native-code-push": "^5.0.0-beta",
    "react-native-device-info": "^0.11.0",
    "react-native-exceptions-manager": "^0.2.0",
    "react-native-scrollable-tab-view": "0.7.4",
    "react-native-simple-store": "^1.3.0",
    "react-native-timeago": "^0.3.0",
    "react-native-vector-icons": "^4.3.0",
    "react-native-wechat": "^1.9.9",
    "react-navigation": "^1.0.0-beta.12",
    "react-redux": "^5.0.5",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-saga": "^0.15.6"
  },
  "jest": {
    "preset": "react-native"
  },
  "devDependencies": {
    "babel-eslint": "^7.2.3",
    "babel-jest": "^20.0.3",
    "babel-preset-react-native": "2.0.0",
    "eslint": "^4.5.0",
    "eslint-config-airbnb": "^15.1.0",
    "eslint-plugin-import": "^2.3.0",
    "eslint-plugin-jsx-a11y": "^5.1.1",
    "eslint-plugin-react": "^7.3.0",
    "jest": "^20.0.4",
    "prettier": "^1.5.3",
    "react-test-renderer": "16.0.0-alpha.6",
    "redux-devtools": "^3.4.0"
  }
}

2.3cd到工程路径下,

npm install 
rnpm link

2.4 appdelegate.m中改变一行代码,如下 , 运行即可

屏幕快照 2017-08-31 下午12.12.44.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 176,062评论 25 709
  • 1. Java基础部分 基础部分的顺序:基本语法,类相关的语法,内部类的语法,继承相关的语法,异常的语法,线程的语...
    子非鱼_t_阅读 32,870评论 18 399
  • 【MySQL】Linux下MySQL 5.5、5.6和5.7的RPM、二进制和源码安装 1.1BLOG文档结构图 ...
    小麦苗DB宝阅读 13,634评论 0 31
  • 这个世界有没有什么东西能够永远留下来 我想了又想 似乎没有 花会谢人会死 新旧更替 周而复始 可是我爱的人们呀 我...
    骑驴找马lj阅读 1,238评论 0 0
  • 写生回来,朋友约我头像。 有游戏头像,有QQ头像。 我当然是说 猴啊。 懒散的时候,摸个鱼,发过去。 有个同社团的...
    子蕴蕴阅读 1,697评论 0 2

友情链接更多精彩内容