Skip to main content

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

When integrating Signaling SDK version 2.2.0 and above with Video SDK version 4.3.0 and above, the following errors may appear in the IDE:

  • Android:


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

  • IOS:


    _2
    Unexpected duplicate tasks
    _2
    Multiple commands produce <your_app_build_path>/Contents/Frameworks/aosl.framework/Versions/A'

Reason

Both Signaling SDK versions 2.2.0 and above and Video SDK versions 4.3.0 and above use the same library:

  • Android SDK: lib/x86/libaosl.so
  • IOS SDK: libs/aosl.xcframework

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

Solution

Android SDK

Depending on your integration method, follow the corresponding solution below:

  • Using CDN

    1. Manually delete the following files in 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 the packagingOptions node to the android node in the build.gradle file to specify that the first matching file is preferred 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
    }

    1. After the Gradle file synchronization is complete, rebuild the project.

IOS SDK

Depending on your integration method, follow the corresponding solution below:

  • Using CDN

    1. Manually delete the libs/aosl.xcframework file in the SDK package.
    2. Rebuild the project.
  • Using CocoaPods

    1. After successfully running the pod install command to install the SDK, manually delete the aosl.xcframework file in the project's /Pods/AgoraRtm path.
    2. Rebuild the project.
vundefined