- 博客(81)
- 资源 (1)
- 收藏
- 关注
原创 react-native <0.69 Exceptions.h:5:10: fatal error: ‘fbjni/fbjni.h‘ file not found
新建react-native 0.69.6版本项目,运行报错 Exceptions.h:5:10: fatal error: 'fbjni/fbjni.h' file not found
2022-10-21 11:21:17 893 1
原创 react-native >0.69版本 链接@ant-design/icons-react-native
react-native >0.69版本 链接@ant-design/icons-react-native
2022-10-21 10:17:15 554
原创 android打包后无法访问http请求
遇到的问题:android打完包后无法访问http请求问题原因:android默认拒绝应用程序使用明文流量的请求,如http解决方案:在AndroidManifest.xml文件<application中添加下列代码"android:usesCleartextTraffic="true...
2022-05-19 10:34:56 1198
原创 Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
问题:更新完Android studio后新建项目运行报错报错信息:Failed to apply plugin ‘com.android.internal.application’.Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.You can try some of the following options: - changing the IDE settings. - c.
2022-05-18 10:12:54 297
原创 Plugin with id ‘com.android.application‘ not found.
从科大讯飞官网下载下来的demo编译报错解决方案:将下列代码粘贴到报错项目的build.gradle中,再次编译即可。buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.0' }}allprojects { repositorie.
2022-03-16 08:57:56 3319
原创 react-native Error installing Flipper-Glog
问题:新建"react-native": "0.67.3"项目,pod install时卡在Flipper-Glog一直失败解决方案:1、找到./node_modules/react-native/scripts/react_native_pods.rb文件,将Flipper-Glog to 0.3.6改成0.3.92、找到./node_modules/react-native/scripts/ios-configure-glog.sh文件,在CURRENT_ARCH="${CURRENT_AR.
2022-03-03 15:34:52 4278
原创 react Hook useReducer()和useContext()实现Redux效果
useReduceruseState 的替代方案。它接收一个形如 (state, action) => newState 的 reducer,并返回当前的 state 以及与其配套的 dispatch 方法,跟Redux类似。在某些场景下,useReducer 会比 useState 更适用,例如 state 逻辑较复杂且包含多个子值,或者下一个 state 依赖于之前的 state 等。并且,使用 useReducer 还能给那些会触发深更新的组件做性能优化,因为你可以向子组件传递 dispa.
2022-02-25 10:38:56 809
原创 react Hook useContext()
useContext接收一个上下文对象(React.createContext的返回值,可以理解为全局比变量)并返回该上下文的当前值。当前的上下文值由上层组件中距离当前组件最近的属性<MyContext.Provider>决定value。当上层最近<MyContext.Provider>更新时,该 Hook 会触发重渲染,并使用最新提交给MyContext提供者的上下文value。即使祖先使用React.memo或使用组件,也会在其自身shouldComponentUpdat.
2022-02-25 08:57:05 691
原创 react Hook useEffect()
useEffect可以让你在函数组件中执行副作用操作,数据获取,设置订阅以及手动更改 React 组件中的 DOM 都属于副作用,可以把 useEffect Hook看做 componentDidMount,componentDidUpdate 和 componentWillUnmount 这三个生命周期函数的组合。
2022-02-24 16:32:35 453
react-native android 识别读取NFC卡信息 唤醒App
2022-01-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人