博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
react native开发日记
阅读量:4576 次
发布时间:2019-06-08

本文共 2186 字,大约阅读时间需要 7 分钟。

##设置npm镜像 npm config set registry https://registry.npm.taobao.org --global npm config set disturl https://npm.taobao.org/dist --global (npm search失效,镜像地址修改回默认https://registry.npmjs.org/) ##设置yran镜像
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global ##安卓的需要android studio配置
##安装facebook的watchman brew install watchman (brew太慢的话可以切换)=>     在~/.bashrc中加入 export HOMEBREW_BOTTLE_DOMAIN=http://7xkcej.dl1.z0.glb.clouddn.com ##初始化项目 react-native init projectName 模拟器: ios: ⌘⇧+h =主键    fetch问题:  ios9以上加入新特性App Transport Security (ATS),要求app访问网络必须为https 解决办法:修改info.list
NSAppTransportSecurity
NSAllowsArbitraryLoads
删除了这一段 -->NSAppTransportSecurity下(不知道为啥加上这一行,运行就白屏,并且不报错)
NSExceptionDomains
demo.deepdot.com
NSIncludesSubdomains
localhost
NSIncludesSubdomains
引用:https://segmentfault.com/a/1190000002933776
 react-native中的 proptype报错   PropTypes has been moved to a separate package. Accessing React.PropTypes is no longer supported and will be removed completely in React 16. Use the prop-types package on npm instead. 使用第三方库prop-types代替,用来检查prop的类型是否合规 用法:
import PropTypes from 'prop-types'    /*假装这里有一个名为bilibili的类*/ bilibili.propTypes = {   name: PropTypes.string   //bilibili类接受的prop定义限制为string,具体说明查看文档https://facebook.github.io/react/docs/typechecking-with-proptypes.html }
react-native run-ios时报错:react native development, non-minified, hmr disabled解决办法:(版本问题)    yarn remove babel-preset-react-native    yarn add babel-preset-react-native@2.1.0

 

 

 

导航组件 React-natvigation 

  官方地址:https://reactnavigation.org/docs/intro/ 

  相关文章地址:http://blog.csdn.net/u013718120/article/details/72357698

expo:

 安卓下载地址

APP图标替换

  项目目录/android/app/src/main/res/ 

  mdpi 48 | hdpi 72 | xhdpi 96 | xxhdpi 144

安卓APK打包:

http://reactnative.cn/docs/0.49/signed-apk-android.html#content

http://www.jianshu.com/p/1380d4c8b596

 

 

 
 
 
 
 

转载于:https://www.cnblogs.com/insight0912/p/7365599.html

你可能感兴趣的文章
Mysql主从配置,实现读写分离
查看>>
完整版本的停车场管理系统源代码带服务端+手机android客户端
查看>>
HTML标签(二)
查看>>
在weblogic下运行Python脚本
查看>>
短信开发技术总结--协议篇
查看>>
HashMap实现原理分析
查看>>
私有类方法
查看>>
java网络编程Socket通信详解
查看>>
为什么使用Nosql:Nosql和SQL的区别
查看>>
<转>DNS服务系列之二:DNS区域传送漏洞的安全案例
查看>>
LINUX中常用操作命令
查看>>
【android】动画效果研究(View)【1】
查看>>
(三)常用的数学函数
查看>>
生产信息集成分析平台(MIIAS V1.0) 概述
查看>>
学习进度——第十五周
查看>>
简谈-网络爬虫的几种常见类型
查看>>
File对象目录列表器
查看>>
(K)ubuntu上将分区格式化成NTFS格式
查看>>
mysql5.7二进制包安装方式
查看>>
装饰者模式——Java设计模式
查看>>