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
**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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With