[v0.69.4] Android build fails after Hermes was enabled
See original GitHub issueDescription
I created a new RN project and enabled Hermes as per the steps mentioned in Using Hermes section. The Android build fails while iOS build works fine.
Stack Trace
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.facebook.react:hermes-engine:+.
Required by:
project :app
> Failed to list versions for com.facebook.react:hermes-engine.
> Unable to load Maven meta-data from https://www.jitpack.io/com/facebook/react/hermes-engine/maven-metadata.xml.
> Could not GET 'https://www.jitpack.io/com/facebook/react/hermes-engine/maven-metadata.xml'.
> Connect to www.jitpack.io:443 [www.jitpack.io/149.56.28.39] failed: connect timed out
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 38s
at makeError (/Users/divyanshumahajan/Desktop/rn-latest/new/schmoozeApp/node_modules/execa/index.js:174:9)
at /Users/divyanshumahajan/Desktop/rn-latest/new/schmoozeApp/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/divyanshumahajan/Desktop/rn-latest/new/schmoozeApp/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/divyanshumahajan/Desktop/rn-latest/new/schmoozeApp/node_modules/@react-native-community/cli/build/index.js:192:9)
Version
0.69.4
Output of npx react-native info
System:
OS: macOS 12.4
CPU: (8) arm64 Apple M2
Memory: 127.03 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.11.0 - /usr/local/bin/npm
Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 30, 31, 32, 33
Build Tools: 30.0.2, 30.0.3, 31.0.0, 33.0.0
System Images: android-33 | Google APIs ARM 64 v8a
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.4 => 0.69.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Steps to reproduce
- Create a new React Native project using the
npx react-native init <PROJECT NAME>
command. - Enable Hermes according to the steps mentioned in Enable Hermes section.
- Create and run the Android build using
react-native run-ios
command.
Snack, code example, screenshot, or link to a repository
As the repository is private, I won’t be able to share it. Apologies for the lack of code samples!
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Bundled Hermes - React Native
This page gives an overview of how Hermes and React Native are built. ... build of Hermes won't be compatible with a build...
Read more >react-native-codegen | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >react-native changelog - Awesome JavaScript - LibHunt
v0.70.3 Changes ... Use NMake generator for Hermes build on Windows (9d08d55bbe by ... Fix error of release builds with Hermes enabled for...
Read more >React Native (Android) - Failed to transform hermes-debug.aar
I'm also upgrading RN version to 0.70.1, from 0.69.x you have some changes to do in app/build.gradle about hermes.
Read more >React Native Integration | Hermes
Using a custom Hermes build in a React Native app. ... If you are following this common route, be sure to note the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @t-leclercq @cortinico, I am no longer facing this issue after migrating to 0.70.0. I will close this issue for now since there’s no reproducer and nobody has encountered the same error. If you think this requires further investigation, please let me know if I can help in any way.
Thanks!