Skip to main content

How do I handle issues when integrating the Signaling SDK and Video/Voice SDK simultaneously?

When integrating Signaling SDK version 2.2.0 and above with Video/Voice SDK version 4.5.0 or higher, the following errors may appear in the IDE:


_1
com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'lib/x86/libaosl.so'

Why this happens

Both Signaling SDK versions 2.2.0 and above and Video/Voice SDK versions 4.5.0 and above use the same library:

  • Android: libaosl.so

  • iOS/macOS: aosl.xcframework

  • Windows: libaosl.dll

As a result, the IDE detects multiple files with the same path during the build process, leading to errors.

Solution

Follow these steps to resolve the issue:

Signaling version 2.2.8 or later

For Signaling SDK version 2.2.8 or later, compare the versions of the aosl libraries used in the Video/Voice SDK and Signaling SDK. Choose the subsequent operations based on the two.

info

You can find the aosl library version for the SDKs in the Video SDK or Voice SDK release notes and Signaling release notes.

  • If the Signaling aosl version is lower, integrate the lite SDK:


    _6
    dependencies {
    _6
    // If you are using RTM SDK version 2.2.8 or later
    _6
    // Replace x.y.z with the specific SDK version number, such as 2.2.8
    _6
    // You can obtain the latest version number from the release notes.
    _6
    implementation 'io.agora.rtm:rtm-sdk-lite:2.2.8'
    _6
    }

  • If the Signaling aosl version is higher, integrate the latest aosl component and use pickFirst to ensure the higher-version aosl library is prioritized during the build process.


    _13
    android {
    _13
    // ...
    _13
    packagingOptions {
    _13
    pickFirst 'lib/**/libaosl.so'
    _13
    }
    _13
    }
    _13
    _13
    _13
    dependencies {
    _13
    implementation 'io.agora.infra:aosl:x.y.z'
    _13
    // implementation RTM sdk
    _13
    // implementation RTC sdk
    _13
    }

Signaling version 2.2.2 to 2.2.6

For Signaling SDK versions between 2.2.2 and 2.2.6, compare the versions of the aosl libraries used in the Video/Voice SDK and Signaling SDK, then delete the library file with the lower version.

info

You can find the aosl library version for the SDKs in the Video SDK or Voice SDK release notes and Signaling release notes.

If the version of the aosl library included in the Video/Voice SDK package is lower, delete the outdated library file based on the target platform:

  • Android: Delete the older-version libaosl.so file from the SDK package.
  • iOS/macOS: Delete the older-version aosl.xcframework file from the SDK package.
  • Windows: Delete the older-version libaosl.dll file from the SDK package.

If the version of the aosl library in the Signaling SDK package is lower, integrate the lite SDK, then clean and rebuild your project to resolve the library conflict.


_7
// ...
_7
dependencies {
_7
// If you are using RTM SDK version 2.2.2 to 2.2.6
_7
// Replace x.y.z with the specific SDK version number, such as 2.2.2
_7
// You can obtain the latest version number from the release notes.
_7
implementation 'io.agora:agora-rtm-lite:x.y.z'
_7
}

Signaling versions prior to 2.2.2

If you are using a Signaling SDK version prior to 2.2.2, refer to the following solutions based on your platform.

  • Using CDN

    1. Manually delete the following files from the SDK package:

    • lib/x86/libaosl.so

    • lib/x86_64/libaosl.so

    • lib/armeabi-v7a/libaosl.so

    • lib/arm64-v8a/libaosl.so

    1. Rebuild the project
  • Using Maven

    1. Add a packagingOptions block to the android block of your build.gradle file to ensure the first matching native library is prioritized during the build process:


      _9
      android {
      _9
      // ...
      _9
      packagingOptions {
      _9
      pickFirst 'lib/x86/libaosl.so'
      _9
      pickFirst 'lib/x86_64/libaosl.so'
      _9
      pickFirst 'lib/armeabi-v7a/libaosl.so'
      _9
      pickFirst 'lib/arm64-v8a/libaosl.so'
      _9
      }
      _9
      }

    2. After the Gradle files are synchronized, rebuild the project.