Does not work with RN 0.74.1 or ExpoSDK 51.
I took a fresh Expo SDK 51 project with RN 0.74.1 installed and ran npx expo run:android. I got the following error message during the build process:
> Task :react-native-quick-sqlite:configureCMakeDebug[arm64-v8a] FAILED
C/C++: /Users/xxx/WebstormProjects/react-native-quick-sqlite/node_modules/react-native-quick-sqlite/android/CMakeLists.txt debug|arm64-v8a : com.google.prefab.api.NoMatchingLibraryException: No compatible library found for //ReactAndroid/fabricjni. Rejected the following libraries:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-quick-sqlite:configureCMakeDebug[arm64-v8a]'.
> [CXX1214] /Users/xxx/WebstormProjects/react-native-quick-sqlite/node_modules/react-native-quick-sqlite/android/CMakeLists.txt debug|arm64-v8a : User has minSdkVersion 21 but library was built for 23 [//ReactAndroid/fabricjni]
After that error message, I installed expo-build-properties and set the minSdkVersion to 23. However, the error message remained the same.
Minimal reproducible example: https://github.com/RRaideRR/react-native-quick-sqlite
Same issue with the bare react-native app!
The same way like author did and the same error
Moved to op-sqlite and success build with rn 0.74.1
Any news on this please?
you can create a patch:
File name: patches/react-native-quick-sqlite+8.1.0.patch
content:
diff --git a/node_modules/react-native-quick-sqlite/android/build.gradle b/node_modules/react-native-quick-sqlite/android/build.gradle
index afcda02..2b8ea08 100644
--- a/node_modules/react-native-quick-sqlite/android/build.gradle
+++ b/node_modules/react-native-quick-sqlite/android/build.gradle
@@ -63,7 +63,7 @@ android {
}
defaultConfig {
- minSdkVersion 21
+ minSdkVersion 23
targetSdkVersion safeExtGet('targetSdkVersion', 28)
versionCode 1
versionName "1.0"
There is a PR fixing this issue waiting for merge
you can create a patch: File name:
patches/react-native-quick-sqlite+8.1.0.patchcontent:
diff --git a/node_modules/react-native-quick-sqlite/android/build.gradle b/node_modules/react-native-quick-sqlite/android/build.gradle index afcda02..2b8ea08 100644 --- a/node_modules/react-native-quick-sqlite/android/build.gradle +++ b/node_modules/react-native-quick-sqlite/android/build.gradle @@ -63,7 +63,7 @@ android { } defaultConfig { - minSdkVersion 21 + minSdkVersion 23 targetSdkVersion safeExtGet('targetSdkVersion', 28) versionCode 1 versionName "1.0"There is a PR fixing this issue waiting for merge
I fixed the issue with patch-module, and be able to run it with npx expo run:android, but couldn't run it with npx Expo start. Anyone know why? or how to fix this issue?
This issue is fixed on main. I referenced the main branch directly from my package.json like this:
"react-native-quick-sqlite": "github:margelo/react-native-quick-sqlite#main",
And now and Android CI build works without problems.
@mrousavy please release an npm upgrade so my yarns don't take forever.
@ductridev op-sqlite does'nt support typeorm, to difficult to migrate big project to raw sql. Tried build work, but bot driver found for the late version.
If you have driver for last, please repleat me.
@wogno so you should try above solutions, which can fix the problem.
I was using this solution until the version 8.2.0 was releases. If I try to install the main link, it shows the error that I need to install the react-native-quick-sqlite dependency. If I use the 8.2.0 version, I get this error:
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
> 2 files found with path 'lib/arm64-v8a/libjsi.so' from inputs:
- /workspace/channels/node_modules/react-native-quick-sqlite/android/build/intermediates/library_jni/debug/jni/arm64-v8a/libjsi.so
- /.gradle/caches/8.8/transforms/307dea209135b468612d0cc030606a8c/transformed/jetified-react-android-0.74.5-debug/jni/arm64-v8a/libjsi.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
Any clue how to suppress this error?
I was using this solution until the version
8.2.0was releases. If I try to install the main link, it shows the error that I need to install thereact-native-quick-sqlitedependency. If I use the8.2.0version, I get this error:* What went wrong: Execution failed for task ':app:mergeDebugNativeLibs'. > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction > 2 files found with path 'lib/arm64-v8a/libjsi.so' from inputs: - /workspace/channels/node_modules/react-native-quick-sqlite/android/build/intermediates/library_jni/debug/jni/arm64-v8a/libjsi.so - /.gradle/caches/8.8/transforms/307dea209135b468612d0cc030606a8c/transformed/jetified-react-android-0.74.5-debug/jni/arm64-v8a/libjsi.so If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/r/tools/jniLibs-vs-imported-targetsAny clue how to suppress this error?
IIRC, you need to clean all Android build folders (.cxx, build, ...) before building with the new version.
Running ./gradlew clean will not clean all files necessary. Probably best to clean the whole repo with git clean -xdf
Forgot to mention that I am using expo 51 and they have the clean task.
Edit:
Even after cleaning everything, the build for Android does not work because it find two files:
jni/arm64-v8a/libjsi.so
+1 using it without Expo. Same output (RN 0.75.4): 2 files found with path 'lib/arm64-v8a/libjsi.so' from inputs: - /Users/runner/work/1/s/node_modules/react-native-quick-sqlite/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libjsi.so - /Users/runner/.gradle/caches/transforms-4/b8a7f419199e0f7ddeded381c5a3e9cd/transformed/jetified-react-android-0.75.4-debug/jni/arm64-v8a/libjsi.so If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/r/tools/jniLibs-vs-imported-targets
Managed to patch the package and the build was successful:
diff --git a/node_modules/react-native-quick-sqlite/android/build.gradle b/node_modules/react-native-quick-sqlite/android/build.gradle
index 4c3478b..5beed8f 100644
--- a/node_modules/react-native-quick-sqlite/android/build.gradle
+++ b/node_modules/react-native-quick-sqlite/android/build.gradle
@@ -61,6 +61,17 @@ android {
}
}
+ packagingOptions {
+ excludes = [
+ "META-INF",
+ "META-INF/**",
+ "**/libjsi.so",
+ "**/libc++_shared.so",
+ "**/libreact_nativemodule_core.so",
+ "**/libturbomodulejsijni.so"
+ ]
+ }
+
buildFeatures {
buildConfig true
prefab true
Any news on this please?