Replies: 1 comment 1 reply
-
Could you please write what version of RNGH are you using in your app? Autolinking should be working but you have to use a fairly recent version of the library. I'll convert this issue to discussion as it's not really actionable at this point. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey :)
I am opening this issue because I was dealing with this for a few days with expo bare workflow on a android (simulator and real device), and the related threads were closed "due to spam" without any clear advice by the contributers, so a lot of developers have to figure it out own their own.
676
494
I already found a solution, which worked for me, but I didn't see any better option to share the knowledge than to open a new issue. I had activated jetifier, which seems to be a prerequisite, but it was not enough for me. In the other threads and other sources it's always mentioned that autolinking is working seamlessly for RN >= 0.60. For me it was not, and from the other threads I assume that others have the same issue. So don't buy into it too fast, and save some days :) All I had to do is to link the library manually:
react-native link react-native-gesture-handler
Then build the app again, which I do with "yarn android". You should find something like the following content in the MainApplication.java, whereas the Import and the "new RNGestureHandlerPackage()" are the imporant lines here (Should have been added automatically):
...
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
...
@OverRide
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new SvgPackage(),
new SafeAreaContextPackage(),
new AsyncStoragePackage(),
new RNGestureHandlerPackage(),
);
}
...
And as you might face the next issue after fixing it, I want to mention that for the below libraries It was the same story:
react-native link @react-native-async-storage/async-storage
react-native link react-native-safe-area-context
react-native link react-native-svg
I hope it helps, and it would be interesting to get some feedback, if this is really the best solution. If if's not helpful, please close or delete the thread.
Beta Was this translation helpful? Give feedback.
All reactions