
React Native
jinrui_w
认真做好每一件事
展开
-
RN开发iOS项目编译报错:Undefined symbols for architecture armv7
RN开发iOS项目编译报错主要报错信息:Undefined symbols for architecture armv7: "FlipperState::start(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from: facebook::flipper::FlipperClient::sta原创 2020-12-14 13:50:57 · 859 阅读 · 0 评论 -
React Native 开发iOS真机调试
第一步,使用Xcode打开项目 (项目目录/ios/项目名称.xcodeproj)第二步,使用真机运行项目第三步,晃动手机,选择Debug JS Remotely浏览器会自动打开地址:http://localhost:8081/debugger-ui/第四步,将localhost修改为本机ip地址查看电脑ip地址的方法:点击WiFi图标 --> 打开网络偏好设置…将第三步中的地...原创 2019-07-10 10:07:36 · 4492 阅读 · 0 评论 -
React Native 插件 react-native-jrtagtext(带标签的Text)
React Native中带标签的Text,支持iOS和Android,效果见下图:使用方法:首先在需要的位置导入:import JRTagText from 'react-native-jrtagtext';使用<JRTagText tag="标签" content="这里放置你想显示的内容。这里放置你想显示的内容。这里放置你想显示的内容。"/>...原创 2019-06-12 09:45:01 · 812 阅读 · 0 评论 -
React Native开发报错Task 'installDebug' not found in project ':app'.的解决办法
场景描述:在配置好Android自动打包后,使用Android Studio是可以正常运行的,但是使用react-native run-android运行会报错:Task 'installDebug' not found in project ':app'.解决办法:使用react-native run-android --variant channel01Debug运行,channel0...原创 2019-04-25 10:45:31 · 7262 阅读 · 0 评论 -
React Native 项目 Module `react-native-*` does not exist in the Haste module map 问题的解决办法
问题描述:最近遇到了好几次这个问题,都是在安装完新的插件后发生的,提示之前安装的插件出了问题。Module `react-native-*` does not exist in the Haste module解决办法:首先,运行npm install react-native-* -save( 注意: react-native-*为插件名称)然后,关闭下图窗口并运行yarn star...原创 2019-03-24 14:50:14 · 5520 阅读 · 0 评论 -
React Native 项目FlatList上拉加载函数onEndReached调用两次的解决办法
问题描述:在使用FlatList做上拉加载数据的时候,发现onEndReached总是会同时调用两次,据说这个FlatList一个bug。解决办法:使用 lodash 避免短时间内重复调用同一个函数第一步: 需要导入import * as _ from 'lodash';第二步: 在构造方法中做如下配置,其中getMoreData是上拉加载要调用的函数constructor(pro...原创 2019-03-26 09:28:05 · 2324 阅读 · 0 评论 -
React Native项目二级页面设置tabBarVisible: false无法隐藏tabBar问题
问题描述:我的项目结构是这样的:tabNavigater上有两个stackNavigator,每个stackNavigator上都有对应的首页和详情页面,在进入详情页后,我想隐藏tabBar,做如下设置(未生效):static navigationOptions = { tabBarVisible: true,}解决办法:在创建stackNavigator时,做如下配置:const...原创 2019-03-21 14:27:40 · 1620 阅读 · 0 评论 -
React Native 项目运行在安卓模拟器Http请求报错
问题描述:安卓模拟器使用http请求报错TypeError: Network request failed,但是https可以正常使用解决办法:找到react_native_config.xml文件(路径:rn项目中android/app/src/debug/res/xml),此文件中内容是这样的:<?xml version="1.0" encoding="utf-8"?>...原创 2019-03-21 09:20:09 · 1732 阅读 · 2 评论 -
运行别人写的react native项目demo到安卓模拟器上问题
运行Demo步骤:下载react native项目demo终端打开项目目录,执行yarn install或npm install打开Android Stadio,启动安卓模拟器运行在安卓模拟器上:react-native run-android我遇到的问题:在终端执行react-native run-android,提示License for package Android SDK...原创 2019-03-17 14:48:54 · 855 阅读 · 0 评论 -
运行别人写的react native项目demo遇到的问题
运行别人写的react native项目demo遇到的问题运行Demo步骤:下载react native项目demo终端打开项目目录,执行yarn install或npm install运行在iOS模拟器上:react-native run-ios我遇到的问题:问题1:首先,在终端执行react-native run-ios,提示Entry, ":CFBundleIdentifi...原创 2019-03-17 12:52:38 · 703 阅读 · 0 评论 -
React Native报错:Application XXX has not been registered.
问题描述: 我在编辑完一个项目的时候,新建了一个新的项目,然后执行react-native run-ios命令,结果出现如下错误: Application XXX has not been registered. This is either due to a require() error during initialization or failure to call Ap原创 2017-02-17 17:55:45 · 10282 阅读 · 0 评论 -
React Native中ListView的简单使用
使用组件ListView实现iOS中UITableView的简单展示效果,包含row和section。效果图: 直接上代码:import React, { Component } from 'react';import { AppRegistry, StyleSheet, ListView, Text, View原创 2017-02-16 15:16:47 · 1379 阅读 · 0 评论