react-native
Study_WangYL
这个作者很懒,什么都没留下…
展开
-
react-native 遇到的坑汇总(补充中)
1.Could not create ADB Bridge. ADB location: **\platform-tools\adb.exeapp:installDebugFAILURE: Build failed with an exception.What went wrong: Execution failed for task ‘:app:installDebug’. com.and原创 2017-09-29 14:32:12 · 13841 阅读 · 1 评论 -
React-native:Undefined is not an object
Undefined is not an object(evaulating PropTypes.arrayOf) Undefined is not an object(evaulating PropTypes.func) undefined is not an object evaluating ReactInternals.ReactCurrentOwner针对这样的报错,如果排除拼写错误,则原创 2017-11-30 19:17:44 · 996 阅读 · 0 评论 -
关于TypeError : React object is undefined on createElement
调试过程中遇到这个问题: TypeError : React object is undefined on createElement检查了数次没发现哪里的问题,最后终于找到原因。React的导入方式不对,很低级的错误,今后可能也有朋友像我一样粗心,为免多走弯路也为提醒自己不要再犯这样的错误,所以记录一下。现场还原:源代码:// 数据展示和事件交互'use strict';import Rea原创 2017-12-05 20:06:40 · 760 阅读 · 0 评论 -
一个简单的demo说明集成reactnative到android项目
集成reactnative到android项目1.新建文件夹,创建子目录andorid,将android项目移动至android目录下。2.在根目录下创建package.json文件{ “name”: “MyReactNativeApp”, “version”: “0.0.1”, “private”: true, “scripts”: { “start”: “nod原创 2017-11-22 10:02:37 · 1022 阅读 · 0 评论 -
ReactNative-Android OnActivityResult不执行
本来想将这个记录到 react-native遇到的坑 一篇中去的,但为了记住这个明显的差异,独立出来。原生开发中,我们是用startActivityForResult(intent,requestCode)配合onActivityResult(int requestCode, int resultCode, Intent data)获取从另一个activity返回的数据。在ReactNative-A原创 2017-12-22 18:41:22 · 1854 阅读 · 0 评论 -
把原生模块封装成js模块
把原生模块封装成js模块 未封装之前原生模块的调用,以一个简单的例子说明。 未封装,在js中的调用: NativeModules.WebViewModule.openUCBrower("http://www.baidu.com");封装: ./business_modules/WebViewModule.js'use strict';import { NativeModules } from原创 2017-12-28 15:31:11 · 2976 阅读 · 1 评论 -
将rn集成到android中,rn图片去向
将rn集成到android中,rn中图片的去向目录结构:index.android.jsimport React, { Component,} from 'react';import { AppRegistry, Image, Text, View, } from 'react-native';class DemoProject extends C原创 2017-12-28 17:37:50 · 1120 阅读 · 0 评论