Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.22.1 breaks Android build #3355

Closed
thegrandpoobah opened this issue Jan 25, 2025 · 2 comments
Closed

2.22.1 breaks Android build #3355

thegrandpoobah opened this issue Jan 25, 2025 · 2 comments
Labels
Missing repro Platform: Android This issue is specific to Android

Comments

@thegrandpoobah
Copy link

Description

I've been running RNGH 2.20.x for a while and because of a bug that I believe is fixed in 2.22.x, I decided to upgrade RNGH by npm upgrade react-native-gesture-handler --save.

Once I did this and tried to install my app on my phone via metro (npm run start, followed by run on Android with my physical phone plugged in), I get these errors related to React Native Gesture Handler during the compilation log:

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
733 actionable tasks: 26 executed, 707 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

e: file:///home/sahab/Documents/freelance/LoadedLuxury/loaded-app/node_modules/react-native-gesture-handler/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt:3:27 Unresolved reference: BaseReactPackage
e: file:///home/sahab/Documents/freelance/LoadedLuxury/loaded-app/node_modules/react-native-gesture-handler/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt:22:33 Unresolved reference: BaseReactPackage
e: file:///home/sahab/Documents/freelance/LoadedLuxury/loaded-app/node_modules/react-native-gesture-handler/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt:34:3 'createViewManagers' overrides nothing
e: file:///home/sahab/Documents/freelance/LoadedLuxury/loaded-app/node_modules/react-native-gesture-handler/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt:43:3 'getViewManagers' overrides nothing
e: file:///home/sahab/Documents/freelance/LoadedLuxury/loaded-app/node_modules/react-native-gesture-handler/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt:51:3 'getModule' overrides nothing
e: file:///home/sahab/Documents/freelance/LoadedLuxury/loaded-app/node_modules/react-native-gesture-handler/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt:59:3 'getReactModuleInfoProvider' overrides nothing

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-gesture-handler:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

I fully admit this might be something with my machine/env setup, but it is pretty strange because now even if I /downgrade/ it won't fix the issue.

Things I've tried:

  • npm run start --clear-cache
  • delete node_modules and npm install
  • downgrade to 2.20.x and then upgrade to a couple different variants (2.21.x)

I'm pretty stumped on what could be wrong

My package.json:

{
  // ...
  },
  "dependencies": {
    "@cosmicmedia/react-native-markdown-display": "^1.1.7",
    "@gorhom/bottom-sheet": "^5.0.5",
    "@invertase/react-native-apple-authentication": "^2.3.0",
    "@notifee/react-native": "^7.8.2",
    "@react-native-async-storage/async-storage": "^1.23.1",
    "@react-native-camera-roll/camera-roll": "^7.5.2",
    "@react-native-clipboard/clipboard": "^1.14.1",
    "@react-native-community/blur": "^4.4.0",
    "@react-native-community/datetimepicker": "^7.6.4",
    "@react-native-community/hooks": "^3.0.0",
    "@react-native-community/slider": "^4.5.2",
    "@react-native-firebase/analytics": "^21.1.0",
    "@react-native-firebase/app": "^21.1.0",
    "@react-native-firebase/app-check": "^21.1.0",
    "@react-native-firebase/auth": "^21.1.0",
    "@react-native-firebase/crashlytics": "^21.1.0",
    "@react-native-firebase/messaging": "^21.1.0",
    "@react-native-firebase/remote-config": "^21.1.0",
    "@react-native-google-signin/google-signin": "^11.0.0",
    "@react-navigation/bottom-tabs": "^6.6.1",
    "@react-navigation/native": "^6.1.16",
    "@react-navigation/stack": "^6.4.1",
    "axios": "^1.7.2",
    "clevertap-react-native": "^2.2.1",
    "dotenv": "^16.4.5",
    "formik": "^2.4.5",
    "fuse.js": "^7.0.0",
    "google-libphonenumber": "^3.2.34",
    "i18next": "^23.10.1",
    "lodash": "^4.17.21",
    "numeral": "^2.0.6",
    "react": "18.2.0",
    "react-i18next": "^14.1.0",
    "react-native": "0.73.5",
    "react-native-asset": "^2.1.1",
    "react-native-blob-util": "^0.19.9",
    "react-native-buffer": "^6.0.3",
    "react-native-compressor": "^1.8.25",
    "react-native-config": "^1.5.2",
    "react-native-confirmation-code-field": "^7.4.0",
    "react-native-country-codes-picker": "^2.3.5",
    "react-native-device-info": "^11.1.0",
    "react-native-fast-base64": "^0.1.2",
    "react-native-file-access": "^3.1.0",
    "react-native-gesture-handler": "^2.22.1",
    "react-native-get-random-values": "^1.11.0",
    "react-native-gifted-chat": "^2.6.4",
    "react-native-iconify": "^1.0.1",
    "react-native-image-picker": "^7.1.2",
    "react-native-keyboard-controller": "^1.15.2",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-localize": "^3.3.0",
    "react-native-logs": "^5.1.0",
    "react-native-mime-types": "^2.5.0",
    "react-native-modal-datetime-picker": "^17.1.0",
    "react-native-paper": "^5.12.3",
    "react-native-permissions": "^4.1.5",
    "react-native-reanimated": "^3.15.5",
    "react-native-reanimated-carousel": "^3.5.1",
    "react-native-safe-area-context": "^4.14.1",
    "react-native-screens": "^3.29.0",
    "react-native-share": "^10.2.1",
    "react-native-simple-biometrics": "^1.5.2",
    "react-native-sqlite-storage": "npm:@boltcode/react-native-sqlite-storage@^7.0.0",
    "react-native-svg": "^15.1.0",
    "react-native-url-polyfill": "^2.0.0",
    "react-native-vector-icons": "^10.0.3",
    "react-native-vision-camera": "^3.9.2",
    "react-native-webview": "^13.12.0",
    "tiny-node-eventemitter": "^1.0.5",
    "uuid": "^11.0.5",
    "yup": "^1.4.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@faker-js/faker": "^8.4.1",
    "@openapitools/openapi-generator-cli": "^2.13.4",
    "@react-native/babel-preset": "0.73.21",
    "@react-native/eslint-config": "0.73.2",
    "@react-native/metro-config": "0.73.5",
    "@react-native/typescript-config": "0.73.1",
    "@testing-library/react-native": "^12.4.5",
    "@trivago/prettier-plugin-sort-imports": "^4.3.0",
    "@types/google-libphonenumber": "^7.4.30",
    "@types/jest": "^29.5.12",
    "@types/lodash": "^4.17.6",
    "@types/numeral": "^2.0.5",
    "@types/react": "^18.2.6",
    "@types/react-native-sqlite-storage": "^6.0.5",
    "@types/react-native-vector-icons": "^6.4.18",
    "@welldone-software/why-did-you-render": "^8.0.1",
    "babel-jest": "^29.6.3",
    "eslint": "^8.19.0",
    "eslint-plugin-testing-library": "^6.2.0",
    "husky": "^9.0.11",
    "jest": "^29.7.0",
    "prettier": "2.8.8",
    "react-native-dotenv": "^3.4.11",
    "react-native-svg-transformer": "^1.3.0",
    "react-native-version-ext": "^4.0.2",
    "typescript": "5.0.4"
  },
  "engines": {
    "node": ">=18"
  }
}

My node version is v20.11.1 and I've provided all the other information below.

Is my RN version too old? I don't see more recent versions of RN as being a requirement...

Steps to reproduce

I've detailed everything up there.. I just upgraded my RNGH and ran into these issues... before that it was working really well.

Snack or a link to a repository

N/A (private application and I haven't created a small repo yet)

Gesture Handler version

2.22.1

React Native version

0.73.5

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Real device

Device model

Samsung Galaxy A53

Acknowledgements

Yes

@thegrandpoobah thegrandpoobah changed the title 0.22.1 breaks Android build 2.22.1 breaks Android build Jan 25, 2025
@github-actions github-actions bot added Platform: Android This issue is specific to Android Missing repro labels Jan 25, 2025
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@thegrandpoobah
Copy link
Author

Crud.. I missed this in the installation instructions.. https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation needs RN 0.74+... closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

1 participant