New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.so files in a react-native project (Android) #30297
Comments
Having the same issue. Any news about this? |
You should be fine by removing the
|
@cortinico The SDK provides shared library(.so file), and I have no interest in excluding these files by putting in the gradle "pickfirst or exclude ..." because otherwise the application encounters bugs and in fact it cannot use the SDK. |
The |
Closing as this has been fully addressed in React Native 0.71+ |
Description
I am currently working on a mobile application with react-native which I would like to integrate my own SDK by calling it in the gradle.
implementation 'eu.polestar:naosdk:4.+'
So, I switched to the native code and I implemented the necessary functions, but the problem is that the SDK contains libc++_shared.so libraries which break the execution of the code and I have this
By the way, I'm not interested in excluding the libc++_shared files, so I put them in a 'lib' folder by following the tree below:
And I add in the gradle:
sourceSets { main.jniLibs.srcDirs += "src/main/lib" }
to copy the .so files and take them into account in the execution.At this stage, I avoided the previous error, the application is running normally but as soon as I try to use a feature from my SDK I encounter an unexpected error which returns to the fact the .so files are not taken taken into account in the project.
React Native version:
react: 16.13.1 => 16.13.1
react-native: ~0.63.3 => 0.63.3
Steps To Reproduce
The details of the SDK implementation are here: https://docs.nao-cloud.com/docs/mobile-sdk/android-sdk/quick-start/
and i just ran in terminal: react-native run-android
Expected Results
What I'm trying to do or find out is if there is a compromise between react-native's c ++ _ shared.so libraries and those provided by the SDK.
Snack, code example, screenshot, or link to a repository:
Here is my gradle:
`apply plugin: "com.android.application"
import com.android.build.OutputFile
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/expo-updates/scripts/create-manifest-android.gradle"
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' }
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
The text was updated successfully, but these errors were encountered: