Building React Native into AAR Including Third-Party Native Libraries and TurboModule SO Files #811
Closed
gt-zhangyaochen
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
In general that is not recommended. React Native relies on sources being distributed so that the app can compile all of them. The problem is that, as there is C++ code to be compiled, as soon as the NDK version changes, your library will have to be recompiled. That ties your library to a specific React Native version, which makes it way less portable. If you really need to distribute an |
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
-
Hello,
I am currently working on integrating a React Native project into an existing Android application by packaging it as an AAR (Android Archive). However, I am encountering some issues with third-party libraries and TurboModule-generated SO files that have native implementations and are not being included in the AAR.
Here are the specific challenges I am facing:
Third-Party Libraries with Native Implementations:
Several third-party libraries used in my React Native project have native code. These native implementations are not getting packed into the final AAR file.
TurboModule Generated SO Files:
I have TurboModules in my project which are generating SO files. These SO files are also not being included in the AAR. As a result, I'm facing issues when trying to use the AAR in the Android application.
I would appreciate any guidance or best practices for ensuring that these native dependencies and generated SO files are properly included when building the AAR. Are there specific Gradle configurations or steps I should follow to achieve this?
Thank you for your time and assistance.
Best regards,
Beta Was this translation helpful? Give feedback.
All reactions