错误错误:找不到库“librnscreens.so”,js引擎:hermes

问题描述 投票:0回答:1

当我尝试运行:npm run android 我收到以下错误:

**ERROR  Error: Exception in HostObject::get for prop 'RNSModule': java.lang.UnsatisfiedLinkError: dlopen failed: library "librnscreens.so" not found, js engine: hermes**
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
 ERROR  Invariant Violation: Failed to call into JavaScript module method AppRegistry.runApplication(). Module has not been registered as callable. Registered callable JavaScript modules (n = 11): Systrace, JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter, RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule, HMRClient, RCTEventEmitter.
        A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

我将

build.gradle
更改为

project.ext.react = [
    entryFile: "index.js",
    enableHermes: true, 
    bundleInDebug: true // clean and rebuild if changing
]

重置缓存

没有成功 该应用程序在ios中运行良好 有人有想法吗?
我在 Mac 中使用 Visual Code 与 android studio 和模拟器

android react-native hermes
1个回答
0
投票

我遇到了同样的事情,我想这是由于最近react-native-screens的变化造成的。我通过降级解决了这个问题:

“@react-navigation/native”:“6.0.13”, “@react-navigation/native-stack”:“6.4.0”, “反应本机屏幕”:“3.14.0”

希望有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.