React-Native踩过的那些坑
来源:互联网 发布:ubuntu on windows 10 编辑:程序博客网 时间:2024/06/15 07:59
- 问题1:undefined is not an object (evaluating ‘ReactInternals.ReactCurrentOwner’)
出现这个错误让我搞了半天,刚开始以为是this指针绑定问题,最后发现不是。
解决方案:
先在项目根目录执行
npm install
然后再
npm start
- 问题2:No dimension set for key window
解决方案:
关闭远程,清空项目,然后重新运行app。Try closing terminal, deleting ios/build and run again. I had the same issue but now its working.
- 问题3:打包好的ReactNative运行在自己X64CPU的手机上,打开RN页面直接闪退
错误:
java.lang.UnsatisfiedLinkError: dlopen failed: "xxx/libgnustl_shared.so" is 32-bit instead of 64-bit
解决方案:
1、在项目的根目录的 gradle.properties里面添加一行代码
android.useDeprecatedNdk=true.
2、在project的root目录下的build.gradle中添加如下代码。
defaultConfig { ··· ndk{ abiFilters "armeabi-v7a","x86" } packagingOptions { exclude "lib/arm64-v8a/librealm-jni.so" } }
- 问题4:Could not get BatchedBridge, make sure your bundle is packaged correctly
解决方案:
首先确认手机的网和电脑的网在不在同一网段。然后需要查看React Packger是否Loading Js 文件。设置Dev Setting的ip地址以及网段。
阅读全文
1 0
- React-Native踩过的那些坑
- React Native 学习中踩过的那些坑
- react-native 踩过的坑
- react-native踩过的坑
- 那些年,React 踩过的坑
- React-Native的那些坑
- 【React Native】踩过的坑(五)
- Windows环境下安装React Native踩的那些坑
- React Native 配置/运行的那些坑
- React Native 我的那些坑
- React Native Navigator 引入的那些坑
- React那些年, 踩过的一些坑(连载中...)
- 《React-Native系列》34、 ReactNative的那些坑
- windows平台开发react-native的那些坑
- 《React-Native系列》34、 ReactNative的那些坑
- 【React Native】那些年RN上跳过的坑
- 关于React Native windows 下踩过的坑总结(都是从网上找来的)
- React-native 踩的坑
- Container With Most Water
- Orcale安装步骤
- after effect cc入门教程
- 03.15 Linux必掌握的目录结构
- 百炼 1657:Distance on Chessboard
- React-Native踩过的那些坑
- switch case语句
- [日常Debug]Hive问题之org.apache.hadoop.security.AccessControlException
- Math.ceil floor 函数例子
- javascript字符串
- eclipse项目中.classpath文件详解
- ArcGIS中我国常用的坐标系统WKID列表
- Java语言基础——字符串String
- mysql复杂delete操作