Build fails on Android. RNGestureHandlerPackage not found
See original GitHub issueDescription
I’m trying to build my app for android by doing ./gradlew bundlerelease
, but I am getting errors. (See below for details)
Steps To Reproduce
- Follow installation instructions here: https://docs.swmansion.com/react-native-gesture-handler/docs/#installation
- Try to build the android app by doing
./gradlew bundlerelease
Expected behavior
App builds successfully
Actual behavior
App does not build.
Getting the following error:
> Task :app:compileReleaseJavaWithJavac FAILED
/Users/humad-home/tvproject-mobile/android/app/src/main/java/com/serializdmobile/MainApplication.java:11: error: cannot find symbol
import com.swmansion.gesturehandler.RNGestureHandlerPackage;
^
symbol: class RNGestureHandlerPackage
location: package com.swmansion.gesturehandler
/Users/humad-home/tvproject-mobile/android/app/src/main/java/com/serializdmobile/MainApplication.java:12: error: cannot find symbol
import com.swmansion.gesturehandler.RNGestureHandlerPackage;
^
symbol: class RNGestureHandlerPackage
location: package com.swmansion.gesturehandler
/Users/humad-home/tvproject-mobile/android/app/src/main/java/com/serializdmobile/MainApplication.java:13: error: cannot find symbol
import com.swmansion.gesturehandler.RNGestureHandlerPackage;
^
symbol: class RNGestureHandlerPackage
location: package com.swmansion.gesturehandler
/Users/humad-home/tvproject-mobile/android/app/src/main/java/com/serializdmobile/MainApplication.java:14: error: cannot find symbol
import com.swmansion.gesturehandler.RNGestureHandlerPackage;
^
symbol: class RNGestureHandlerPackage
location: package com.swmansion.gesturehandler
/Users/humad-home/tvproject-mobile/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:33: error: cannot find symbol
import com.swmansion.gesturehandler.RNGestureHandlerPackage;
^
symbol: class RNGestureHandlerPackage
location: package com.swmansion.gesturehandler
/Users/humad-home/tvproject-mobile/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:104: error: cannot find symbol
new RNGestureHandlerPackage(),
^
symbol: class RNGestureHandlerPackage
location: class PackageList
Note: /Users/humad-home/tvproject-mobile/android/app/src/main/java/com/serializdmobile/MainActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors
FAILURE: Build failed with an exception.
Package versions
- React: 16.13.1
- React Native: 0.63.4
- React Native Gesture Handler: git://github.com/software-mansion/react-native-gesture-handler.git#5572e8d65d73889f0bdb91f5aaa33cc1958971cd
(For React Native Gesture Handler, I’m on the above commit which fixes modal issues)
Other notes
This is only an issue with Android. The iOS app builds perfectly. I was able to build the Android app a few days ago. Not sure why it has stopped building now. I can’t find anything in my project’s commit history that indicates a breaking change.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12
Top Results From Across the Web
" com.swmansion.gesturehandler.react" ERROR APPEARS
I was copying mainapplication from old projects. My problem was this line: import com.swmansion.gesturehandler.react.RNGestureHandlerPackage ...
Read more >[Solved]-Android 'react-native-gesture-handler' error-React ...
How to resolve the duplicate class error in between react native and android sdk? error Android project not found. Are you sure this...
Read more >In-app-payments-react-native-plugin android sqip ...
... react-native-square-in-app-payments my android project no longer builds and throws the error: “error: package sqip.react does not exist” ...
Read more >package com.swmansion.reanimated does not exist - You.com
I inherited a React Native app from consultants and am trying to get it to build on Android. When I run npx react-native...
Read more >react-native-gesture-handler - npm
It makes touch interactions and gesture tracking not only smooth, ... Example within this repo can be found in the FabricExample README.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mwegener-com have you found solution?
npm install --save react-native-gesture-handler
npx pod-install ios