Build fails when using EAS but expo build works fine

Hi all,

So I’ve just realised my build fails when publishing to the app store and realised the command I was using prior is superseded by EAS. So I migrated my CI/CD pipeline to use EAS and I’ve realised it keeps failing on the gradlew step.

> Task :app:mergeDebugNativeLibs FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeDebugNativeLibs'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr]    >
[stderr] More than one file was found with OS independent path 'lib/x86_64/libturbomodulejsijni.so'. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 4m 12s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
757 actionable tasks: 757 executed
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

Any ideas?

I’m getting the exact same error in the EAS build for android.

I’m on sdk 42. We’re using react-native-reanimated so I tried pinning the version as suggested at the links below to version 2.2.3 with no success:
https://github.com/expo/eas-cli/issues/607

Is there a way to see which version gradle is using? I don’t see it in the logs.

1 Like

I have the same problem. I did not change my package.json and the build for android just started to fail.
I’m on SDK v42 right now. Will a newer version work?

Supposedly newer versions of the SDK don’t have this issue. We’re going upgrade from 42 to hopefully 44 next week and see if it fixes the issues.

I ended up creating a new project and installing all my packages one by one (third party) and even the expo ones I required. Then once the build worked I replaced my dependencies in package.json with the new one that worked and it’s been fine since. I believe it was a versioning issue and judging from your comment I think that confirms it.

All good now though!

1 Like

@owen_a that’s great to hear. Can you share your package.json dependencies and devDependencies to see what versions worked for you? We’re in the process of doing our upgrade today. Thanks!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.