Skip to content

React Native 79.1 Android build issue for old arch ( works in new arch ) #99

@Gautham495

Description

@Gautham495

Current behavior

Build error

  • What went wrong:
    Execution failed for task ':app:mergeDebugNativeLibs'.

A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
2 files found with path 'lib/arm64-v8a/libreactnative.so' from inputs:
- /Users/gauthamvijayan/app/node_modules/react-native-keys/android/build/intermediates/library_jni/debug/copyDebugJniLibsProjectOnly/jni/arm64-v8a/libreactnative.so
- /Users/gauthamvijayan/.gradle/caches/8.13/transforms/b71edfebd9c919902717bad6057e24a7/transformed/jetified-react-android-0.79.1-debug/jni/arm64-v8a/libreactnative.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets

Expected behavior

Should have built

Platform

  • Android

React Native Version

0.79.1

React Native Keys Version

0.7.11

Reproducible Steps And Demo

I add this to the build.gradle in the keys library and it worked.

packagingOptions {
excludes = [
"/libc++_shared.so",
"
/libfbjni.so",
"/libreactnativejni.so",
"
/libjsi.so",
"/libreact_nativemodule_core.so",
"
/libturbomodulejsijni.so",
"/MANIFEST.MF",
"
/libreactnative.so", //Add this line
""
]
doNotStrip '**/*.so'
}

@numandev1 - Will need a fix for this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions