Skip to content

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

@rhrusha

Description

@rhrusha

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions