React native 如何在react native中启用Hermes引擎

React native 如何在react native中启用Hermes引擎,react-native,react-native-android,react-native-hermes,React Native,React Native Android,React Native Hermes,我按照官方文档在我的应用程序中启用了Hermes引擎,但以下内容始终返回false: const-isHermes=()=>!!global.HermesInternal; console.log(“>>>>>”,isHermes()); 我在android/app/build.gradle中所做的更改如下: project.ext.react = [ enableHermes: true, // clean and rebuild if changing ] 然后我做了一个干净的

我按照官方文档在我的应用程序中启用了Hermes引擎,但以下内容始终返回false:

const-isHermes=()=>!!global.HermesInternal;
console.log(“>>>>>”,isHermes());
我在android/app/build.gradle中所做的更改如下:

project.ext.react = [
    enableHermes: true,  // clean and rebuild if changing
]
然后我做了一个干净的构建:

cd android && ./gradlew clean

yarn android

但是console.log总是返回false

您的应用程序是否在右上角显示了类似的内容?此应用程序已经开发了一段时间,因此这不是@rishikesh_07的选项。这就是为什么我尝试用Log实现类似的功能。你能确保你的apk包含
libhermes.so
libhermes inspector.so
libhermes executor debug.so
?您能否进一步确保它不包含JSC?这使得这在RN模板项目中发生。