3

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?

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

0

Im getting the same issue
getReactModuleInfoProvider' overrides nothing FAILURE: Build failed with an exception. * What went wrong:

Fix : Change to this version “react-native-screens": "^2.18.1"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.