How can a React Native app be converted into a library that a native Android app can use?

Viewed 21

I have a bunch of views made in React Native that I want to use in a native android app. To do this, the official docs require me to change the entire project structure of the native app. I think this is to facilitate auto-linking. But I'm looking for an easier way that allows any native android app to use my views.

So, I tried to create an aar for the react native views (by changing com.android.application to com.android.library in app/build.gradle) but the code of native dependencies in /node_modules is not present in the final aar.

How can I include these native dependencies in the final aar? Or perhaps there is a better way to approach this. I would be grateful if someone with more experience could advise on this.

0 Answers
Related