“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 ofSceneView
解决办法: 项目根目录 打开 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