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

[expo-sqlite] Android test builds fail (task :expo:mergeDebugAndroidTestNativeLibs) #28887

Open
oldratip opened this issue May 15, 2024 · 1 comment
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@oldratip
Copy link

Minimal reproducible example

https://github.com/oldratip/expo-sqlite-android-testbuild-error

What platform(s) does this occur on?

Android

Did you reproduce this issue in a development build?

Yes

Summary

Simply adding expo-sqlite to the project creates an issue with the Android test build.

To reproduce:

  1. Clone the example repo.
  2. npm install
  3. Create test build: cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug (note: this also occurs with the release variant of the test build).
  4. During the build process, the following error appears:
> Task :expo:mergeDebugAndroidTestNativeLibs FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':expo:mergeDebugAndroidTestNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
   > 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
      - /Users/oldratip/expo_projects/expo-sqlite-android-testbuild-error/node_modules/expo-sqlite/android/build/intermediates/library_jni/debug/jni/arm64-v8a/libc++_shared.so
      - /Users/oldratip/.gradle/caches/transforms-4/9bfd8d8ccf6aec4b45fb273f99ca2fd0/transformed/jetified-react-android-0.74.1-debug/jni/arm64-v8a/libc++_shared.so
     If you are using jniLibs and CMake IMPORTED targets, see
     https://developer.android.com/r/tools/jniLibs-vs-imported-targets

The non-test build of the app works without problems.

The example repo was created as follows:

  • npx create-expo-app@latest --template blank@51
  • npx expo install expo-sqlite
  • npx expo prebuild

A similar issue was reported a while back for expo-av: #20224

Thanks for your support.

Environment

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.4.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.13.1 - ~/.nvm/versions/node/v20.13.1/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.5.2 - ~/.nvm/versions/node/v20.13.1/bin/npm
Watchman: 2024.04.15.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
Android SDK:
API Levels: 30, 31, 32, 33, 34
Build Tools: 30.0.2, 30.0.3, 32.0.0, 33.0.1, 34.0.0, 35.0.0
System Images: android-32 | Google APIs ARM 64 v8a, android-33 | Google Play ARM 64 v8a
IDEs:
Android Studio: 2023.3 AI-233.14808.21.2331.11709847
Xcode: 15.4/15F31d - /usr/bin/xcodebuild

Expo Doctor Diagnostics

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check for issues with metro config
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check native tooling versions
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that packages match versions required by installed Expo SDK
✔ Check that native modules use compatible support package versions for installed Expo SDK

Didn't find any issues with the project!

@oldratip oldratip added the needs validation Issue needs to be validated label May 15, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels May 15, 2024
@roggyboy
Copy link

I'm also getting this error.
Is there any known workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants