React-native-gesture-handler: REACT-NATIVE automatic linking

Created on 19 Jul 2019  路  10Comments  路  Source: software-mansion/react-native-gesture-handler

I am using react-navigation for my react-native app , as docs said to use these commanads
npm install react-native-gesture-handler
npm install react-navigation

as my react-nnative version is 0.60.3 it said it will link automatically
i was getting error like this after build
image

then i used these commands

react-native install --save react-native-gesture-handler
react-native link react-native-gesture-handler.

after build it said error like " react-native 0.60.3 uses autolinking u have linkled react-native-gesture-handler manually ".
then i have unlinked it using below command as it suggested .

react-native unlink react-native-gesture-handler

now ....
after build it is working ... . react-navigation is working after linking and unnlinking ..
?

All 10 comments

This is horrible, I have the same problem and if this library doesn't work, react-navigation doesn't work either. I can't fix it at all.

A workaround is to link the libraries manually.

In Xcode just go to libraries > add files to "Project Name"
Screen Shot 2019-07-23 at 7 36 03 PM

and navigate to Project Name > Node Modules > react-native-gesture-handler > ios > RNGestureHandler.xcodeproj and hit ADD

Then go to Build Phases > Link Binary with Libraries and hit the PLUS and search for libRNGestureHandler.a and add that.

This should do that trick until auto-linking.

for auto linking iOS you need extra step
cd ios
pod install
this installs the pod for Gesture handler.

@smeekmeister I've tried that and having the same issue

RN Version: 0.60.4
react-native-gesture-handler: 1.3.0

and run pod install again

basically, we already need link manually, right?

you need to remove the Gesture handler Xcode project from your project en do via cocoa pods.

@smeekmeister I've tried that and having the same issue

RN Version: 0.60.4
react-native-gesture-handler: 1.3.0

and run pod install again

basically, we already need link manually, right?

add it to your Podfile and run cd ios && pod install

Maybe clean your project and start over again. I am using over 20 libraries all via cocoapods. My pod file has the standard react entries as per documentation in rn diff purge so React, React-Core, etc until Follly, then all the firebase ones, the FBSDK ones, GoogleSignIn and lottie-ios. If I run pod install all pods are installed including the ones from package json, eg. react-native-reanimated, rnc鈥檚 etc ... and also react-native-gesture-handler

When is autolinking going to be supported? Currently I get either the RN autolink error or does-not-found error.

When is autolinking going to be supported? Currently I get either the RN autolink error or does-not-found error.

Use a tool "jetifier" Click

@SpawnAtis I already use that. But I got the autolinking working by changing the build.gradle file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TerrerSandman picture TerrerSandman  路  3Comments

chhornponleu picture chhornponleu  路  3Comments

tallen11 picture tallen11  路  3Comments

rgangopadhya picture rgangopadhya  路  4Comments

nguyenhose picture nguyenhose  路  4Comments