![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
React-Native
老汉带你推推推
转了一圈,发现还是把笔记托管省心。。。自己搞有点儿累。。。。这就是让专业的人做专业的事儿。
就是广告TMD多了!!!
展开
-
[reactNative]github下来后要先npm install
如果不这么做,gradle会跑不起来。原创 2018-01-22 10:52:52 · 448 阅读 · 0 评论 -
[reactNative]unable to load script from assets ‘index.android.bundle’
unable to load script from assets ‘index.android.bundle’ ,make sure your bundle is packaged correctly or youu’re runing a packager server0x0001 产生原因,缺少bundle,为啥缺少,不知道。 0x0002 解决: 1. 在Android...原创 2018-06-21 12:42:50 · 145 阅读 · 0 评论 -
[RN]常用清理
This might be related to https://github.com/facebook/react-native/issues/4968To resolve try the following:Clear watchman watches: watchman watch-del-all.Delete the node_modules folder: rm -rf no...原创 2018-08-09 10:40:34 · 631 阅读 · 0 评论 -
[RN]no viewmanager defined for class RNSVGline
解决: 擦, 擦, 擦, 真TM不省心,需要按照如下操作:https://github.com/react-native-community/react-native-svg原创 2018-08-09 12:32:56 · 721 阅读 · 0 评论 -
[RN]android 中TabNavigator放到底部
const BottomTabs = TabNavigator( { Combined: { screen: Combined, path: 'combined', }, Trend: { screen: Trend, path: 'trend',...原创 2018-08-08 11:15:56 · 298 阅读 · 0 评论 -
[RN]xxxx/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit
xxxx/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit Could not load: libgnustl_shared.so Could not load: libglog.so Could not load: libglog_init.so Could not load: libreactna...原创 2018-08-08 15:41:04 · 1114 阅读 · 0 评论 -
[RN]unable to load script from assets ‘index.android bundle’ ,make sure your bundle is packaged corr
unable to load script from assets ‘index.android bundle’ ,make sure your bundle is packaged correctly or youu’re runing a packager serverresolve#mkdir android/app/src/main/assets//cd to top lev...原创 2018-08-08 16:00:37 · 236 阅读 · 0 评论 -
[RN]使用React Native Navigation v2
官网https://wix.github.io/react-native-navigation/v2/#/docs/Installing坑:1.需要改application,这个和之前把rn加入已经有的android project是不一样的。并且加完之后,需要删除之中的旧的代码 2.注意这个reactNative51要和Android studio中Module的build V...原创 2018-08-28 17:03:07 · 445 阅读 · 0 评论 -
[RN]一个模版
[RN]一个模版/** * Created by ${USER} on ${DATE} */ import React, {Component} from 'react';import { StyleSheet, Text, View, Image,} from 'react-native';export default class ${NAME...原创 2018-09-19 15:37:09 · 193 阅读 · 0 评论 -
webstorm + prettier 去掉自动保存时候自动添加分号 ;
webstorm上装了prettier结果每次保存都出来个;,非常烦人,查资料后如下取消:其他的设置,可以参考这里:https://prettier.io/docs/en/options.html原创 2018-10-29 15:49:42 · 5409 阅读 · 0 评论 -
[RN]为什么要带上 abiFilters "armeabi-v7a", "x86"
做rn的时候都会加上这个:android { compileSdkVersion 28 defaultConfig { ndk { abiFilters "armeabi-v7a", "x86" //this 货 } } }原因是啥呢?因为rn jni里已经写了:...原创 2018-10-31 18:27:58 · 7986 阅读 · 2 评论 -
[RN]react-navigation V2 tips
隐藏titlebarclass LoginScreen extends Component{ static navigationOptions={ header: null }}原创 2018-10-30 11:59:47 · 105 阅读 · 0 评论 -
[RN]笔记
图片添加点击:<TouchableOpacity><Image source={}/></TouchableOpacity>原创 2018-11-13 07:37:26 · 127 阅读 · 0 评论 -
[RN]js文件直接调用.json文件当对象
file tree./data.jsontest.js使用import data from "./data".....render(){data.xxxx}感触JS开发真你娘的爽原创 2018-11-13 09:46:50 · 749 阅读 · 0 评论 -
[react-native]prop,state对比
作用范围不同prop用于定义外部接口state用于内部状态记录赋值的时间不同prop的赋值在外部世界使用组件时state的赋值在组件内部是否改变组件不应该改变prop的值state存在的目的就是让组件来改变其他UI=render(data)prop是property的缩写作用范围不同prop用于定义外部接口class Conr...原创 2018-04-25 13:21:16 · 268 阅读 · 0 评论 -
[react-native]元素
https://react-native-training.github.io/react-native-elements/docs/getting_started.html原创 2018-04-05 12:08:53 · 192 阅读 · 0 评论 -
[react-native]需要看的东西
AsyncStorage -》react-native.js原创 2018-04-05 11:58:59 · 109 阅读 · 0 评论 -
[reactNative]log
console.log('_addOnBarCodeReadListener');会在logcat中显示,但是是Info。原创 2018-01-22 11:59:08 · 396 阅读 · 0 评论 -
[RN]注意问题
1.变动比较快,需要经常跟着走原创 2018-01-09 12:39:23 · 179 阅读 · 0 评论 -
[RN]环境搭建--跑起来示例
搭建环境homebrewNode安装完成后测试完整参考:https://reactnative.cn/docs/0.40/getting-started.html#content 一下是自己在旧环境中改动搭建环境homebrew/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Ho原创 2018-01-09 14:54:28 · 259 阅读 · 0 评论 -
[ractNative]watchman 起不来,page loading不出来
出处表现解决方式删除 watchman 之前用 brew装的Manually install Watchman v470 credits to DavidChmod your users watchman state directory出处https://stackoverflow.com/questions/40414166/react-native-npm-st转载 2018-01-09 18:39:29 · 2760 阅读 · 0 评论 -
[ReactNative] js 和 native 怎么通讯(eg. Toast)
native 怎么写自定义module//ToastModule.javapackage com.retest;import android.widget.Toast;import com.facebook.react.bridge.ReactApplicationContext;import com.facebook.react.bridge.ReactContext原创 2018-01-10 11:32:01 · 233 阅读 · 0 评论 -
[react-native][st]用到的东西
1。AsyncStorage 2。fetch 3。libs "dependencies": { "GitHubTrending": "^2.0.0", "react": "15.3.0", "react-native": "0.32.0", "react-native-check-box": &qu原创 2018-04-09 18:44:07 · 143 阅读 · 0 评论 -
[android]多flavors用gradlew时注意的地方
/gradlew assembleRelease的时候,会报resouce找不到, 这个时候,就需要在: app/build.gradle中添加resource的路径 sourceSets { xxx { java.srcDirs = ['src/xxx/java'] res.srcDirs = ['src/xxx/res'] ...原创 2018-04-02 19:16:11 · 183 阅读 · 0 评论 -
[android][react-native]多flavour怎么打bundle
react-native bundle –platform android –dev false –entry-file index.js –bundle-output android/app/src/main/assets/index.android.bundle –assets-dest android/app/src/main/res/原创 2018-04-02 19:18:36 · 125 阅读 · 0 评论 -
[ReactNative]多flavor怎么运行
reactNative多flavor运行的时候,会碰到问题,那怎么选择运行哪个flavor呢? reactnative run-android获取到错误,然后找到如下内容:Candidates are: 'installStagingDebug', 'installStagingDebugAndroidTest'.根据推荐,带上flavor, 但是要把install去掉...原创 2018-03-27 17:28:37 · 682 阅读 · 1 评论 -
[reactnative]gradlew缺少运行权限引起的问题
问题表现tomdeMacBook-Pro:react-st-consumer tomlucky$ react-native xxxxScanning folders for symlinks in /xxxx/node_modules (17ms)JS server already running.Building and installing the app on the dev...原创 2018-04-04 16:07:26 · 703 阅读 · 0 评论 -
[Redux]资料汇总
http://www.redux.org.cn/原创 2018-04-05 11:30:34 · 142 阅读 · 0 评论 -
[react-native]资料整理
资料汇总https://github.com/rilyu/react-native-awesome教学网站http://coding.imooc.com/class/89.html#Envir原创 2018-04-05 11:29:52 · 113 阅读 · 0 评论 -
[react-native]SyntaxError: Strict mode does not allow function declarations in a lexically nested st
问题真机调试的时候发现这个问题: SyntaxError: Strict mode does not allow function declarations in a lexically nested statement on a newly created app原因我就日了!!!原来是JS调试的问题。解决1。摇一摇手机 2。出来的菜单点:”Dev Setti...原创 2018-04-05 11:52:44 · 391 阅读 · 0 评论 -
[RN]component 模板
import React, { Component } from "react"import { View, Text } from "react-native"import PropTypes from "prop-types"class ${NAME} extends Component { constructor(props) { super(props) thi...原创 2018-11-12 16:52:17 · 214 阅读 · 0 评论