Closed friedger closed 1 year ago
We currently require react-native 0.69.4, if your project uses a different version, you get this error. @friedger which version of react native do you use?
Initially the shared module does not agree any dependencies to react-native. I'm confused how to add it so that gradlew shared:build
works.
Because the android react-native dependency is not available in any public maven repository, the are distributed in the npm package of react-native. But they only include one version. If you get an error telling you react-native could not be found, it is most likely that you have not setup the react-native project correctly, or you have a version mismatch between the npm react-native package and the version used by this library.
You can check if you have setup the project correctly by looking in the node_modules/react-native/android directory, there should be somewhere the react-native android dependency artifact.
Just to clarify, the react-native project is in a separate module?
What do you mean with module? React-native is a separate project https://github.com/facebook/react-native
My project is setup with four modules as follows: |- shared |- androiddemo (using shared) |- iosdemo (using shared) |- rndemo (using shared)
Therefore, I am not sure how to define the dependency of react-native in the shared
module
The project setup we are using with the toolkit (and therefore the tested and supported one) is the standard React Native project setup.
This means the project setup should probably be:
root
| - android
| - app
| - shared <- KMM code goes here
| - ios
| - src (JS)
package.json
The shared
module needs to be added to the /android
directory as described in the project setup documentation.
Closing due to inactivity
I am struggling using reakt-native-toolkit.
I get an error and I can't find information where to add the dependency