Hermes not working on Android
See original GitHub issueDescription
Premise: we have read that hermes is not yet supported on tvOS, but we expected it to work correctly on Android.
When enabling hermes through the android build.gradle
project.ext.react = [
enableHermes: true
]
the app is not compiling because the hermes package is not found, throwing the following error.
Could not determine the dependencies of task ':app:compilePlayStoreDebugJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:playStoreDebugCompileClasspath'.
Could not find any matches for com.facebook.react:hermes-engine:+ as no versions of com.facebook.react:hermes-engine are available.
Required by:
project :app
The responsible code for this is the following part of the build.gradle
of the app to include the hermes dependency
if (enableHermes) {
implementation("com.facebook.react:hermes-engine:+") {
exclude group: 'com.facebook.fbjni'
}
}
One way to workaround this, is to change the build.gradle
dependency to
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
}
to pick the hermes package from the node_modules themself. But this is not the correct way and also it causes other issues later on.
So we need to able to use the correct implementation of implementation("com.facebook.react:hermes-engine:+")
, which doesn’t work.
Version
0.69.5-0
Output of npx react-native info
System: OS: macOS 12.6 CPU: (16) x64 Intel® Core™ i9-9880H CPU @ 2.30GHz Memory: 19.84 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 14.20.0 - /usr/local/opt/node@14/bin/node Yarn: 1.22.18 - /usr/local/bin/yarn npm: 6.14.17 - /usr/local/opt/node@14/bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: 14.0/14A309 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: Not Found react-native-macos: Not Found react-native-tvos: 0.69.5 npmGlobalPackages: react-native: Not Found
Steps to reproduce
The issue is happening also in a freshly created project trough CLI
$ react-native init TestApp --template=react-native-tvos@latest
Snack, code example, screenshot, or link to a repository
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top GitHub Comments
Fixed in 0.69.5-1
I think I have found the problem – RN 0.69 now requires an extra step before NPM publish. I will push out a new version and that should hopefully fix the issue.