i follow settup and always recived this issue . who can solve for me please.
same issue, did you find solution?
i'm still wait for someone can solve , boring now
edit the file android/app/build.gradle and under the dependencies block, add this line:
implementation project(':react-native-gesture-handler')
Did you carefully follow the "readme"? Do you have the newest version of react-native?
I just made a sample project by react-native init and followed the instruction then pasted code from Example App. Could you try it again with newest version of RN and RNGH? 馃槂
@DungBuiDeveloper, @adirzoari did the suggestion by @fera2k help you? I believe this is related to your setup and most likely the library is not properly linked.
Feel free to reopen this issue if the problem persists. Also next time would be much easier if you provide a more comprehensive description of the issue like the full error message, command you run to get the error, if it happens at the build step or runtime etc
I know this issue is closed, but I've stumbled upon the same error when I try to run my app on Android. I have all the latest versions to date and used the getting started guide correctly. But in the end, this fixed it for me:
open app/android/app/src/main/java/com/YOUR_APP_NAME/MainApplication.java:
change this import:
import com.swmansion.gesturehandler.RNGestureHandlerPackage;
to this:
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage
Hope it might help others 馃憤
People still struggling with it can try below command
react-native link react-native-gesture-handler
and then
react-native run-android
did work with me.!
To install react native cli
npm install -g react-native-cli
Happy coding
edit the file android/app/build.gradle and under the dependencies block, add this line:
implementation project(':react-native-gesture-handler')
this works for me ! thanks sir !
implementation project(path: ':react-native-gesture-handler')
Typed it wrong.
It happened to me as I commented following line in app/build.gradle and settings.gradle:
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
I have tried adding implementation project(':react-native-gesture-handler') inside app/build.gradle. But nothing seems to work for me. Also, I have followed everything closely according to your documentation.
@musthafa-pa, could you post more info about your RN and Gradle versions, if you installed RNGH for the first time or you're upgrading and if you cleared Gradle (and other) caches?
Most helpful comment
edit the file android/app/build.gradle and under the dependencies block, add this line:
implementation project(':react-native-gesture-handler')