You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's the error I received immediately after installing react-native-etebase:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-sodium:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'lib/armeabi-v7a/libsodium.so'.
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
The problem is explained in the link from the error, but it ultimately appears to be the react-native-sodium dependency that's at fault.
I was able to get it working by editing the react-native-sodiumgrade.build file like this:
sourceSets {
main {
// jniLibs.srcDirs = ['./lib']
}
}
But of course this will be overwritten whenever the package is updated or reinstalled. I don't know enough about Gradle to overwrite this in my project's gradle.build, so if anyone knows how to do that, I think it would be helpful.
This could potentially happen with other packages as well, not just react-native-sodium. Here's how other people have solved the issue, but the solutions didn't work for me:
Here's the error I received immediately after installing
react-native-etebase
:The problem is explained in the link from the error, but it ultimately appears to be the
react-native-sodium
dependency that's at fault.I was able to get it working by editing the
react-native-sodium
grade.build
file like this:But of course this will be overwritten whenever the package is updated or reinstalled. I don't know enough about Gradle to overwrite this in my project's
gradle.build
, so if anyone knows how to do that, I think it would be helpful.This could potentially happen with other packages as well, not just
react-native-sodium
. Here's how other people have solved the issue, but the solutions didn't work for me:https://stackoverflow.com/questions/62088079/error-when-building-project-with-ndk-support-after-updating-to-android-studio-4
The text was updated successfully, but these errors were encountered: