Skip to content
Home » [SOLVED] 2 files found with path ‘lib/arm64-v8a/libaosl.so’ from inputs

[SOLVED] 2 files found with path ‘lib/arm64-v8a/libaosl.so’ from inputs

That error means your build has duplicate .so (native library) files — Gradle finds 2 copies of libaosl.so under lib/arm64-v8a/.

This usually happens when multiple dependencies include the same native library (for example, two SDKs bundling the same .so).

In my case I am using both agora-rtm-2.2.5 & agora_rtc_engine-6.5.3 to implement live video room and live audio room . When I try to build apk following problem occurs .

Execution failed for task ':app:mergeReleaseNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
> 2 files found with path 'lib/arm64-v8a/libaosl.so' from inputs:

Starting from v2.2.0, the agora-rtm and agora_rtc_engine both include the libaosl.so library. When Gradle merges all native libraries into the APK, it finds duplicates and fails.

To fix this , you can try to use Gradle packagingOptions to resolve duplicates:
Add this to android/app/build.gradle under android { ... }:

android {
  packagingOptions {
        pickFirst("lib/arm64-v8a/libaosl.so")
        pickFirst("lib/armeabi-v7a/libaosl.so")
        
    }
}

This keeps the first occurrence of libaosl.so and ignores duplicates.

If you like this article , please like , comment and share the article . You can also buy me a coffee.

Leave a Reply

Your email address will not be published. Required fields are marked *