3

I am trying to upgrade a react native tvos project to react-native-tvos@0.69.5-2 so that I can enable fabric but am receiving the following error in Android Studio when trying to run the project in emulator:

Caused by: org.gradle.api.UnknownProjectException: Project with path ':ReactAndroid:hermes-engine' could not be found in project ':ReactAndroid'.

I have the following dependencies installed:

"dependencies": {
    "@react-native-community/hooks": "^2.8.1",
    "@react-native-community/netinfo": "^9.3.5",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/devtools": "^6.0.10",
    "@react-navigation/drawer": "^6.5.0",
    "@react-navigation/material-top-tabs": "^6.3.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.1",
    "@react-navigation/stack": "^6.3.2",
    "react": "18.0.0",
    "react-native": "npm:react-native-tvos@0.69.5-2",
    "react-native-android-intent-launcher": "^0.3.0",
    "react-native-event-listeners": "^1.0.7",
    "react-native-fast-image": "^8.6.1",
    "react-native-gesture-handler": "2.3.0",
    "react-native-linear-gradient": "^2.6.2",
    "react-native-mmkv": "^2.4.3",
    "react-native-performance": "^4.0.0",
    "react-native-performance-flipper-reporter": "^4.0.0",
    "react-native-reanimated": "^3.0.0-rc.3",
    "react-native-reanimated-carousel": "^3.0.6",
    "react-native-safe-area-context": "^3.2.0",
    "react-native-screens": "^3.18.2",
    "react-native-vector-icons": "^9.2.0",
    "react-native-webview": "^11.23.1",
    "react-redux": "^8.0.4",
    "redux": "^4.2.0",
    "redux-devtools-extension": "^2.13.9",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.4.1"
  },

1 Answers1

0

This happens for me when enabling new arch on android and running gradle clean. Ironically disabling Hermes in all my testing didn't fix the issue.

After reading through the this github issue and the official docs on Bundled Hermes I upgraded to RN 71.3, used the RN upgrade helper to diff my gradle configurations

I removed the following lines from my settings.gradle to resolve the error:

if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
    include(":ReactAndroid")
    project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid')
}

I'd be lying if I said I completely understood why this issue happens, only how I personally fixed it. Hope this can be helpful if anyone else stumbles across this issue.

Joman68
  • 2,248
  • 3
  • 34
  • 36