Reactnative bug收集与解决

“D:\Program Files\nodejs\node.exe” “D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” install --scripts-prepend-node-path=auto
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename ‘E:\Code\WM\RectNative\RNSimples\node_modules.staging\fsevents-4dbc8900\node_modules\strin
g_decoder’ -> ‘E:\Code\WM\RectNative\RNSimples\node_modules.staging\string_decoder-26180b62’

解决:

libgnustl_shared.so" is 32-bit instead of 64-bit

locating the gradle.properties file in the root project, and add

Android.useDeprecatedNdk=true.

in the build.gradle of the app:

	android {  
	    ...  
	    defaultConfig {  
	        ...  
	        ndk {  
	            abiFilters "armeabi-v7a", "x86"  
	        }  
	  
	        packagingOptions {  
	            exclude "lib/arm64-v8a/librealm-jni.so"  
	        }  
	    }  
	}  

Check the render method of SceneView

invariant violation: invariant vialation: element type is invalid:expected a string(for buil-in components_or a class/function(for composite components)but got :object
Check the render method of SceneView
在这里插入图片描述
解决办法: 项目根目录 打开 cmd :

	npm list -g --depth=0 

查看 react react-native 库之间是否出现 版本冲突问题,
如果出现,根据提示 的版本操作

我的解决是 直接卸载现有版本,更新最新版本

	npm uninstall -g react
	npm uninstall -g react-native
	npm install -g react-native
	npm install g react-native

再次查看 是否有冲突: ’ npm list -g --depth=0 ’
有冲突 卸载冲突版本, 安装不冲突的版本。

Caused by: com.facebook.jni.CppException: Strict mode does not allow function declarations in a lexically nested statement.

Failed to load resource: net::ERR_CONNECTION_REFUSED

解决办法:

Strict mode does not allow function declarations in a lexically nested statement

https://github.com/facebook/react-native/issues/11389

I’ve found how to fix it
open node_modules\react-native\Libraries\Core\InitializeCore.js line 112
change function handleError(e, isFatal) to var handleError = function(e, isFatal)
then do npm start – --reset-cache
hope that it will be fixed soon
I have created pull request for that

error: resource style/Theme.AppCompat.Light.NoActionBar (aka com.rnsimples:style/Theme.AppCompat.Light.NoActionBar) not found.

https://github.com/facebook/react-native/issues/23707
我的解决办法就是 将: project的 build.gradle 中 版本升级 · classpath ‘com.android.tools.build:gradle:3.4.0’ ·
将gradle->gradle-wrapper.properties中 升级位:->distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值