Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unresolved reference: BaseReactPackage in react-native-screens on Android with React Native 0.72.4

I'm working on a project using React Native 0.72.4 (using the default Paper architecture) and I'm encountering build errors on Android related to react-native-screens. The error output (truncated) is as follows: I cant remove the navigation libraries they are mandatory.

e: .../node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt:3:27 Unresolved reference: BaseReactPackage
e: .../RNScreensPackage.kt:19:26 Unresolved reference: BaseReactPackage
e: .../RNScreensPackage.kt:24:5 'createViewManagers' overrides nothing
e: .../RNScreensPackage.kt:51:5 'getModule' overrides nothing
e: .../RNScreensPackage.kt:61:5 'getReactModuleInfoProvider' overrides nothing

Environment

  • React Native: 0.72.4
  • react-native-screens: Installed version is 4.6.0
  • react-native-gesture-handler: Installed version is 2.16.0
  • Android: Using standard Android project settings with auto-linking enabled

**Here is view of my package.json dependancies **

"dependencies": {
  "@react-native-community/cli-platform-android": "^11.4.1",
  "@react-navigation/bottom-tabs": "^7.2.0",
  "@react-navigation/drawer": "^7.1.1",
  "@react-navigation/native": "^7.0.14",
  "@react-navigation/stack": "^7.1.1",
  "axios": "^1.7.9",
  "react": "18.2.0",
  "react-native": "^0.72.4",
  "react-native-gesture-handler": "^2.16.0",
  "react-native-reanimated": "^3.15.1",
  "react-native-safe-area-context": "^4.14.1",
  "react-native-screens": "^4.6.0",
  "react-native-vector-icons": "^10.2.0",
  "rn-fetch-blob": "^0.12.0"
}

Question

  • Could someone please advise on a set of version recommendations (or version matrix) that works reliably together? Specifically
  • Is there a specific version of react‑native‑screens (for example, a version such as 4.4.0) that is known to work with React Native 0.72.4 (Paper) and React Navigation without triggering errors like the BaseReactPackage issue?
  • Are the current versions of react‑native‑gesture‑handler (2.16.0) and the other navigation libraries (@react-navigation/bottom-tabs, etc.) compatible with that version of react‑native‑screens?
  • Any additional configuration changes (e.g., in gradle or native code) that may be required?
like image 946
sandesh pawar Avatar asked Dec 01 '25 18:12

sandesh pawar


1 Answers

Your React Native version is incompatible with react-native-screens.

In the docs, it shows that to use versions 4.5.0+ then you must use react-native version 0.74+. You are using 0.72.4. I'd strongly recommend pinning your React Native version as discrepancies between versions can cause issues like this to frequently pop up.

Depending on how strict your time constraint is for this task, I'd recommend downgrading your RNScreens version, as opposed to upgrading React Naative - as that's a massive pain.

like image 143
EmlynB23 Avatar answered Dec 04 '25 10:12

EmlynB23



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!