React-Native
文章平均质量分 74
程序猿的玻璃心
这个作者很懒,什么都没留下…
展开
-
null is not an object (evaluating ‘this._sceneRefs[t].setNativeProps‘), stack:
错误日志如下:com.facebook.react.common.JavascriptException: null is not an object (evaluating 'this._sceneRefs[t].setNativeProps'), stack:产生这是Android手机通过跑monkey出现的日志,日志提示很明确,this._sceneRefs[t].setNativeProps对象为空,或者不存在。项目是用ReactNative+原生写的。难点这个错误处理不难,难的是,原创 2021-01-21 15:01:03 · 1728 阅读 · 2 评论 -
om.facebook.react.common.JavascriptException: Can‘t find variable: typeAnnotation
总的日志如下:2020-12-28 11:29:42.692 13591-13637/? E/ReactNativeJS: Application TestStartRNActivity has not been registered. Hint: This error often happens when you're running the packager (local dev server) from a wrong folder. For example you have mu原创 2020-12-28 11:57:02 · 1808 阅读 · 4 评论 -
Error: Duplicate resources
[drawable-xhdpi-v4]png: Error: Duplicate resources解决办法:https://stackoverflow.com/questions/53239705/react-native-error-duplicate-resources-android找到node_modules/react-native/react.gradle,在doFirst...原创 2019-10-10 23:25:38 · 7717 阅读 · 0 评论 -
Rn错误集
错误集1、Attempt to invoke virtual method 'android.graphice.Attempt to invoke virtual method 'android.graphice.drawable.Drawable android.graphice.drawable.Drawable$ConstantState.newDrawable(android.cont...原创 2019-07-11 09:55:06 · 733 阅读 · 0 评论 -
RN: requireNativeComponent:"RCTView" was not found in the UIManager.
国内学习RN的难度确实不低,很多错误没遇到,遇到也很难找到答案。多做些错误记录,能帮助后来者解决问题。我的环境是: RN:0.59.5Android手机调试,本意是想开始Debug模式,从网页端能查看到日志,并做断点调试,之前我是0.57版本的,升级之后,发现Debug用不了。并报如下错误开发时,开启 JS Dev Mode或者Debug JS Remotely时,程序均无法正常运行,关掉...原创 2019-05-06 10:13:36 · 6195 阅读 · 1 评论 -
React-Native:从0.57.5升级到0.59.5,Android端遇到的错误以及解决办法
错误日志:Could not get unknown property ‘mergeResourcesProvider’RN从57.5升级到59.5,先把原先的mode_modules删干净,再npm install,完了之后,再用AndroidStudio,build一次安卓项目,得到错误如下:(AndroidStudio中看不到其他的包)FAILURE: Build failed...原创 2019-04-29 15:34:19 · 6953 阅读 · 0 评论 -
error:com.android.ide.common.process.ProcessException: Failed to execute aapt
运行命令打包文件cd android && gradlew assembleRelease报如下错误Execution failed for task ':aliyun-oss-react-native:verifyReleaseResources'.> com.android.ide.common.process.ProcessException: Failed ...原创 2019-03-12 17:48:25 · 3134 阅读 · 0 评论 -
0.57.5版本的RN报错:undefined is not a function(evaluating '_this.registerEvents()')
CSDN上有人给出了解决方案,我项目跟他类似,也是0.57.5版本的RN项目https://blog.csdn.net/u012852597/article/details/82696226官方解决问题记录是在:https://github.com/facebook/react-native/issues/20791有人说这是0.57.0-rc2的问题,在rc3里已经解决了。但我的版本是0...原创 2019-02-12 15:28:31 · 1840 阅读 · 1 评论 -
This is related to npm not being able to find a file
以下是React-Native导入第三方包时报的错误,老手请躲避。运行命令:npm install --save martian-android-supporternpm ERR! path F:\Git\xxx\xxx\node_modules\martian-android-supporternpm ERR! code ENOENTnpm ERR! errno -4058npm ER...原创 2019-02-11 10:46:20 · 57989 阅读 · 5 评论 -
React-Native 一:学习
下载并运行一个github项目 1,下载,例如: HelloRn 2,使用WebStorm打开项目 3,在Terminal中运行命令 npm install : 运行该命令是下载node_modules。每个项目都要运行该命令,下载node_modules。(可以用yarn install命令代替)等待若干时间下载,,, react-native run-and...原创 2018-08-29 11:21:45 · 1283 阅读 · 0 评论