react native杂记
来源:互联网 发布:买水果软件 编辑:程序博客网 时间:2024/05/07 10:43
给Image webview 加载本地资源的时候,是需要加上require字段,然后里面再跟地址
<WebView source={require('./index.html')} style={{marginTop: 20}} onError={this._showError.bind(this)} startInLoadingState={true}/> <Image style={styles.icon} source={require('../img/ic_four_qiche.png')} />
或者使用局域网的本地ip地址定位
<TwebView uri= 'http://192.168.0.151:8081/html/gaode_map.html'/>//http://192.168.0.151:8081代表当前项目的根目录文件夹
当程序蹦了后
突然断开了 就在命令行 任意目录下运行命令
adb reverse tcp:8081 tcp:8081
在这之前可以尝试一下在项目跟目录下运行
react-native start
命令
在导入第三方库的时候,不成功
阴差阳错,在项目目录下:npm install express -gf 再导就成功了
后来发现,只要导入第三方库之前都要执行上面的语句,才会成功
加载更多
//导包 npm install react-native-swRefresh –save
//注释详细
https://github.com/shiwenwen/react-native-swRefresh
https://github.com/greatbsky/react-native-pull
0 0
- react native杂记
- 使用react native开发ios心得杂记
- react native
- React Native
- React Native
- React- Native
- react-native
- React Native
- React Native
- react native
- React Native
- react-native
- React Native
- react native
- React Native
- React Native
- React Native
- React Native
- 重建二叉树
- double保留小数点后两位
- 进度条颜色变化BCB
- spring项目-spring IO platform介绍
- 用 Async 函数简化异步代码
- react native杂记
- 【科普】IP地址详解-你,是谁?(二)
- 更改Linuxshell类型
- 欢迎使用CSDN-markdown编辑器
- eclipse debug项目时tomcat报错
- 应用一般架构
- php常见编码函数
- 简化版单例,使创建的类对象无论重新定义多少次都唯一
- [译]怎样在Vue.js中使用jquery插件