搭建reactive-demo

来源:互联网 发布:word表格数据排序 编辑:程序博客网 时间:2024/05/17 22:27

本以为按照官方的文档进行搭建应该没有问题,没想到官方的文档到处是坑。大家切记。。。。总结一下

为避开官方中的坑,为大家推荐这篇文章

http://blog.csdn.net/u011965040/article/details/53331859?locationNum=15&fps=1


还有在使用reactive-native-cli进行打包,(记得安装react-native-cli)

在当前项目目录安装:使用如下命令(切记asset的目录安装自己的项目目录, 网上的一大片都是错的/android/app/src大坑)

./node_modules/react-native-cli/index.js  bundle --platform android --dev false --entry-file index.android.js --bundle-output ./app/src/main/assets/index.android.bundle --assets-dest ./app/src/main/res/

全局安装的

react-native  bundle --platform android --dev false --entry-file index.android.js --bundle-output ./app/src/main/assets/index.android.bundle --assets-dest ./app/src/main/res/

还有手机和react-native连接到同一个服务器:

使用如下命令打开react native 的设置页面 adb shell input keyevent 82


一些常见的错误给大家推荐下面jip文章


http://www.bubuko.com/infodetail-1406140.html



原创粉丝点击