上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页
摘要: 出现了这个Warning: Activity not started, its current task has been brought to the front这个错误而言,我在网上查了一下,原因是两个应用中的一个已经在系统的缓存中,这是android的机制。相应的解决方法是:重新启动一下模拟器 阅读全文
posted @ 2020-02-12 12:42 Mr·Xu 阅读(948) 评论(0) 推荐(0) 编辑
摘要: 1、引入组件 import { BackHandler, } from 'react-native'; 2、添加监听 componentDidMount(): void { BackHandler.addEventListener('hardwareBackPress', this.onBackBu 阅读全文
posted @ 2020-02-10 11:29 Mr·Xu 阅读(2210) 评论(0) 推荐(0) 编辑
摘要: 1、基本语法 (1)接收通知格式 import { DeviceEventEmitter } from 'react-native'; ... componentDidMount() { //收到监听 this.listener = DeviceEventEmitter.addListener('通 阅读全文
posted @ 2020-02-08 22:16 Mr·Xu 阅读(854) 评论(0) 推荐(0) 编辑
摘要: 实例代码: import React, { Component , PropTypes} from 'react'; import { AppRegistry, StyleSheet, Text, View, TextInput, TouchableOpacity } from 'react-nat 阅读全文
posted @ 2020-02-08 22:05 Mr·Xu 阅读(524) 评论(1) 推荐(1) 编辑
摘要: 修改名称 应用程序的名称默认是使用 react-native-cli 创建项目时的名称。修改的方式很简单,找到相应的配置然后修改即可。例如,我初始化的项目名称叫 test,现在想修改成 测试程序。 Android 编辑 android/app/src/main/res/values/strings. 阅读全文
posted @ 2020-02-08 01:06 Mr·Xu 阅读(670) 评论(0) 推荐(0) 编辑
摘要: 错误1:* What went wrong: Execution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallExc 阅读全文
posted @ 2020-02-08 01:03 Mr·Xu 阅读(3512) 评论(0) 推荐(0) 编辑
摘要: 错误1、Import fails with "Failed to execute 'ImportScripts' on 'WorkerGlobalScope'" 解决1、如果是在Degbug模式下,关闭turn off Debug JS Remotely。再重新运行即可。 错误2:rn报错 unha 阅读全文
posted @ 2020-02-07 09:51 Mr·Xu 阅读(3306) 评论(1) 推荐(0) 编辑
摘要: 问题1:Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app react-native run-android react-native star 阅读全文
posted @ 2020-02-05 23:38 Mr·Xu 阅读(905) 评论(0) 推荐(0) 编辑
摘要: 运用在React 中 setState的对象、数组的操作时是不能用类似array.push()等方法,因为push没有返回值,setState后会出现state变成Number,为了方便他人和自己查看,因此写个数组和对象的操作方法小笔记。 1、修改object中某项 this.setState({ 阅读全文
posted @ 2020-02-05 23:33 Mr·Xu 阅读(3572) 评论(0) 推荐(0) 编辑
摘要: 解决办法:在Android Studio修改AndroidManifest.xml文件。 文件路径:android->app->src->debug->AndroidManifest.xml 在manifest标签中添加 xmlns:tools="http://schemas.android.com 阅读全文
posted @ 2020-02-01 18:26 Mr·Xu 阅读(658) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页