react-native-quick-sqlite icon indicating copy to clipboard operation
react-native-quick-sqlite copied to clipboard

Add support for detox

Open samuelgja opened this issue 1 year ago • 2 comments

Add detox support by exclude some libs in build.gradle

What went wrong

If run android app via detox test, it will failed during the build. Issue is with duplicate .so libraries.

Possible fix

Excludes from Build.gradle, then detox works.

   excludes = [
              "META-INF",
              "META-INF/**",
              "**/libjsi.so",
              "**/libreact_nativemodule_core.so",
              "**/libturbomodulejsijni.so",
              "**/libc++_shared.so",
              "**/libfbjni.so",
              "**/libhermes_executor.so"     
      ]

samuelgja avatar Aug 02 '23 11:08 samuelgja

I was able to successfully run android tests with the previous setup but it may be worth spending some time on this fix. If this change works, lets go ahead and get it in. Is there any documentation or stackoverflow posts that support the idea that this change would work?

aleksblago avatar Aug 02 '23 14:08 aleksblago

@aleksblago almost similar fix is in: https://github.com/mrousavy/react-native-mmkv/pull/512

basically, maybe it works with plain rn app, but when you have a bigger project, with more native libraries, there can be an issue with duplicate .so

samuelgja avatar Aug 08 '23 07:08 samuelgja