You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/eisodev/rubic/rubic-connect/node_modules/react-native-worklets-core/android/build.gradle' line: 38
* What went wrong:
A problem occurred evaluating project ':react-native-worklets-core'.
> Could not get unknown property 'hermesEnabled' for project ':app' of type org.gradle.api.Project.
Fix for the user:
Add the property to gradle.properties like in the upgrade helper.
Potential fix for the package owner:
Set min version on react-native in peerDependencies, or if you intend to support any version like now (*), make sure you read this prop using the old way too. It's declared (from older upgrade guides) like this:
app/build.gradle
....
project.ext.react = [
entryFile: "index.js",
enableHermes: true, // clean and rebuild if changing
devDisabledInStaging: true,
]
...
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and that value will be read here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = project.ext.react.get("enableHermes", true);
If going by ChatGPT4 (which helped me find the root of this problem). PS! This following code is not vetted nor tested by me!
Instead of directly accessing hermesEnabled,
the proper way to check if Hermes is enabled in
modern React Native versions is via enableHermes.
You can update the worklets package's check to:
if (appProject?.ext?.get("react")?.get("enableHermes")) {
return "hermes"
}
The text was updated successfully, but these errors were encountered:
It will also not build to Android device (Android 11)/emulator (Android 13) but iOS works on React Native 0.69.12:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not find com.facebook.react:hermes-android:.
Required by:
project :app
This is probably because of the change made in 0.71.0 related to:
if (enableHermes) {
// These lines instruct Gradle to consume the bundled version of Hermes.
// For further information on Bundled Hermes and how this mechanism works,
// look here: https://reactnative.dev/architecture/bundled-hermes
// noinspection GradleDynamicVersion
implementation("com.facebook.react:hermes-engine:+") { // From node_modules
exclude group:'com.facebook.fbjni'
}
} else {
implementation jscFlavor
}
replaced by
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
Error:
Cause:
The hermesEnabled property was only added from react-native version 0.71.0 in gradle.properties (https://react-native-community.github.io/upgrade-helper/?from=0.68.7&to=0.71.0), which you can see toggling the upgrade helper to lower versions than 0.71.0.
Fix for the user:
Add the property to gradle.properties like in the upgrade helper.
Potential fix for the package owner:
Set min version on react-native in peerDependencies, or if you intend to support any version like now (*), make sure you read this prop using the old way too. It's declared (from older upgrade guides) like this:
app/build.gradle
If going by ChatGPT4 (which helped me find the root of this problem). PS! This following code is not vetted nor tested by me!
The text was updated successfully, but these errors were encountered: