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

More than one file was found with OS independent path 'lib/x86_64/libnativecrypto.so' #36

Open
rhrusha opened this issue Sep 23, 2021 · 1 comment

Comments

@rhrusha
Copy link

rhrusha commented Sep 23, 2021

These lines are conflicting with new Android Gradle Plugin 4.0.

sourceSets {
main {
jniLibs.srcDirs 'jni/libs/'
}
}

Producing errors like

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-fast-crypto:mergeReleaseNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > More than one file was found with OS independent path 'lib/x86_64/libnativecrypto.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

They need to be removed. Prior versions of the Android Gradle Plugin required that you explicitly package any prebuilt libraries used by your CMake external native build by using jniLibs. With Android Gradle Plugin 4.0, the above configuration is no longer necessary and will result in a build failure:

mergify bot pushed a commit to valora-inc/wallet that referenced this issue Jan 12, 2022
### Description

Upgrade react native to 0.66.4.

Notable changes in this PR include:
- Android: upgrade to gradle version 4.2.2
- Android: use mavenCentral as [JCenter has been sunset](https://github.com/facebook/react-native/releases/tag/v0.65.0) - [exoplayer is not available on mavenCentral yet](doublesymmetry/react-native-track-player#1235) so make an exception for that in build.gradle
- Patch react-native-fast-crypto which is [not compatible with gradle 4 yet](EdgeApp/react-native-fast-crypto#36)
- Update Hermes to compatible version
- Update react native/react/react-test-renderer which required many test snapshots to be updated
- Remove references to deprecated `AppState.removeListener` (https://reactnative.dev/docs/appstate#removeeventlistener)
- Verified with activation team that Plaid button is still working correctly on Android. There was a runtime error on app launch which RN suggested to remove the Plaid package from Android Manifest, no official mention of this in the react-native-plaid-link-sdk project but following the RN suggestion worked (even though the react-native-plaid-link-sdk docs still mention [these lines in the setup steps](https://github.com/plaid/react-native-plaid-link-sdk#2-add-plaidpackage-to-your-application))


### Other changes

N/A

### Tested

E2E tests should work as usual, app should build and function as usual.


### How others should test

A basic regression - click around the app and see no broken functionalities

### Related issues

- Fixes #1145 

### Backwards compatibility

N/A
@Nantris
Copy link

Nantris commented Oct 13, 2022

Is this library still maintained? This is a pretty major error.

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

No branches or pull requests

2 participants