Hi, in the build.gradle from the project nativeTemplate you can add below to use the react native from the nodes module folder:
exclusiveContent {
// We get React Native's Android binaries exclusively through npm,
// from a local Maven repo inside node_modules/react-native/.
// (The use of exclusiveContent prevents looking elsewhere like Maven Central
// and potentially getting a wrong version.)
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
// NOTE: if you are in a monorepo, you may have "$rootDir/../../../node_modules/react-native/android"
url "$rootDir/../node_modules/react-native/android"
}
}
}
Hey Austin,
I am not sure that I can solve your issue or not, but when I faced an issue like this, I resolved it by the following way,
Please check that your theme file contains the following files,
I was also getting this issue, and my issue was resolved by adding these 4 files,
You can see the directory of the folder,
Hope it helps!
As a React Native Released its Latest version 0.70 most of users are facing lots of errors without changing anything in their code. To solve More than one file was found with OS independent path 'lib/armeabi-v7a/libfbjni.so' in React Native error You need to add resolution exclusiveContent in your android/build.gradle file in allprojects.repositories.exclusiveContent As Like Given Below.
allprojects {
repositories {
exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
}
}
The above code will force build.gradle to use the React-native version from the node_modules folder and it will resolve this error. However This answer is Given at Here