ReactNative开发问题汇总
webstorm配置 webstorm插件 安装 react templates react native 问题以及技巧 0,启动服务后 使用 localhost:8081 看看是否正常启动 React Native packager is running. 显示
解决: 2.2 再次换个网络试试 无线网.一个有限一个无限不行 网络频段最好2.5G 别用5G 3,以后测试看效果尽量使用模拟器. 我考累 真机各种问题 4 GET http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false 500 (Internal Server Error) 解决: 有时候出现问题(不显示scrollview) 可以尝试设置控件的宽高 或者重新启动服务 5,自己写的scrollveiw 无法设置高度.. 解决: 在render 的时候 在scrollview 外面直接套一层view 这样才能设置高度 6,RawText ” ” must be wrapped in an explicit component. 解决: 控件有问题 我这里 ImageView 中间加了空格 导致的
我这里出问题的 的原因是因为 注释 哪里套了两层中括号{{/子元素/}} 去除一个就好 8 Warning: setState(…): You passed an undefined or null state object; instea 解决: settate 里面 类型不正确 我这里写的是两个小括号 需要用大括号包裹起来 this.setState({currentPage: urrentPage}); 9,标签内部不能有注释…带大括号的注释 10,无法关联ReactNative的源码 需要到settings => languages => javaScript => libraries => 选中你自己想买的 node_modules 就好了 自动提示 网上很多 也是在libraries 里面下载 react 和react native 就行了 11.**Could not install the app on the device,read the error above for details. 项目设置sdk的原因 用studio 打开一次 android 的项目 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |