Is it possible to link a library which has native dependencies inside another library? Trying to find the solution to link manually, but failing to do it so. I found a [question]: Using React-Native library inside another React-Native library summary, saying It is not possible to add/link a library to another library. Is there any manual way to do this or not possible?
[Edit]
Trying to add the react-native-spring-scrollview: ^2.0.20
library to my library react-native-demolibrary
, which is a library created using react-native-create-library
command, since it is a library there were no settings.gradle
file. So created and tried to link manually library to react-native-somelibrary
.
settings.gradle
include ':react-native-spring-scrollview'
project(':react-native-spring-scrollview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-spring-scrollview/android')
build.gradle
implementation project(':react-native-spring-scrollview')
below error has shown up,
GRADLE CONSOLE ERROR
org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Build file 'E:\Workspace\DemoApp\node_modules\react-native-demolibrary\android\build.gradle' line: 37
A problem occurred evaluating project ':react-native-library'.
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139)
at org.gradle.initialization.DefaultGradleLauncher.getConfiguredBuild(DefaultGradleLauncher.java:104)
at .....more
ERROR:
Project with path ':react-native-spring-scrollview' could not be found in project ':react-native-demolibrary'.
Open File
Thank you in advance.