Skip to content
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

[Android] Build error RN 0.74.5 / react-native-quick-sqlite 8.1.0[-8.2.7] #104

Open
tobiasorth opened this issue Jan 13, 2025 · 0 comments

Comments

@tobiasorth
Copy link

Encountered a build failure on Android when using the react-native-quick-sqlite in version 8.1.0 (as well as 8.2.7) with a react native 0.74.5 project (no Expo). The error occurs when building a debug version of the app.

Details

When building in debug mode the following error appears:

> Task :app:mergeDebugNativeLibs FAILED
> Task :react-native-quick-sqlite:mergeDebugAndroidTestNativeLibs FAILED

2 files found with path 'lib/arm64-v8a/libreact_nativemodule_core.so' from inputs:
 - /Users/X/workspace/zeitmeister/app/node_modules/react-native-quick-sqlite/android/build/intermediates/library_jni/debug/jni/arm64-v8a/libreact_nativemodule_core.so
 - /Users/X/.gradle/caches/transforms-4/33fac424075fc23f7fbb9fb5fe63964a/transformed/jetified-react-android-0.74.5-debug/jni/arm64-v8a/libreact_nativemodule_core.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets

Environment

react-native-quick-sqlite: 8.2.7
react-native: 0.74.5
Development OS: macOS
Android Studio: 2024.2.1 Patch 3
Android Target: Debug build
Gradle : 8.6

Background

The issue seems to be similar to this one:
mrousavy/react-native-vision-camera#3270

And as it turns out, it can be fixed like the one mentioned above:
mrousavy/react-native-vision-camera@16d6cd5

Workaround / Fix

When excluding the libraries libreact_nativemodule_core.so and libturbomodulejsijni.so from the package, the build succeeds. This can be achieved by adding the following lines to packaging options in android/build.gradle (L168):

"**/libreact_nativemodule_core.so",
"**/libturbomodulejsijni.so"

I don't know if this error persists in the 9.x.x version but at this point I'm not able to test.

Will investigate further in a couple of days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants