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:
-
iOS:
Why this happens
Both Signaling SDK versions 2.2.0 and above and Video 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:
Manually specify the aosl
library version
Compare the aosl
library versions included in both the Signaling and Video SDKs, and keep the version with the higher number.
You can find version information in the following release notes:
Remove older version files
After identifying the latest version:
- Delete the older version of the
aosl
library from your SDK package. - Ensure the newer version is correctly linked in your build configuration.
- Rebuild the project.
Depending on your integration method, choose from the following solutions:
- Video SDK
- Signaling SDK
If the version of the aosl
library included in the Video SDK package is lower than the version required by your project, 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, resolve the conflict using one of the following methods:
Upgrade to Signaling SDK v2.2.2 or higher
If you are using a Signaling SDK version earlier than 2.2.2, Agora recommends upgrading to v2.2.2 or later. Starting from this version, the Signaling SDK supports:
- iOS: Subspecs for CocoaPods
- Android: Lightweight Maven repositories
These improvements allow better compatibility with Video SDK v4.5.0 and above, and help prevent library conflicts.
-
Android (Java)
dependencies { // If you are using Signaling SDK v2.2.2 or later with Video SDK v4.5.0 or later, // replace x.y.z with the specific version number (for example, 2.2.2). implementation 'io.agora:agora-rtm-lite:x.y.z'}
-
iOS (Objective-C)
platform :ios, '11.0' target 'YourApp' do # If you are using Signaling SDK v2.2.2 or later with Video SDK v4.5.0 or later, # replace x.y.z with the specific version number (e.g., 2.2.2). pod 'AgoraRtm', 'x.y.z', :subspecs => ['RtmKit']end
After upgrading, clean and rebuild your project to apply the changes.
Manually delete duplicate libraries
If you do not want to upgrade to version 2.2.2 or higher, manually remove duplicate library files from the Signaling SDK package.
-
Android
Depending on your integration method (CDN or Maven), manually delete the following files from the Signaling SDK package:
- CDN
- Maven
-
Manually delete the following files:
lib/x86/libaosl.so
lib/x86_64/libaosl.so
lib/armeabi-v7a/libaosl.so
lib/arm64-v8a/libaosl.so
-
Rebuild the project.
- Add the
packagingOptions
block to yourbuild.gradle
file as shown below:android { // ... packagingOptions { pickFirst 'lib/x86/libaosl.so' pickFirst 'lib/x86_64/libaosl.so' pickFirst 'lib/armeabi-v7a/libaosl.so' pickFirst 'lib/arm64-v8a/libaosl.so' } }
- Rebuild the project to apply the changes.
-
iOS SDK (Objective-C)
Depending on your integration method, choose one of the following approaches:
- CDN
- CocoaPods
- Manually delete the
libs/aosl.xcframework
file from the Signaling SDK package. - Rebuild the project.
- Add the following
pre_install
script to the end of yourPodfile
. This script automatically deletes theaosl.xcframework
from the Agora Signaling Pod during installation.pre_install do |installer| # Define the path to the AgoraRtm Pod rtm_pod_path = File.join(installer.sandbox.root, 'AgoraRtm') # Define the full path to aosl.xcframework aosl_xcframework_path = File.join(rtm_pod_path, 'aosl.xcframework') # Delete the framework if it exists if File.exist?(aosl_xcframework_path) puts "Deleting aosl.xcframework from #{aosl_xcframework_path}" FileUtils.rm_rf(aosl_xcframework_path) else puts "aosl.xcframework not found, skipping deletion." endend
- Run
pod install
to reintegrate the SDKs. - Rebuild the project.
-
Flutter SDK
Depending on your target platform, follow the appropriate steps below:
- Android
- iOS
-
Add the
aosl
dependencyIn your project’s root
build.gradle
file, add the following dependency:dependencies { api 'io.agora.infra:aosl:1.2.13' // Other dependencies...}
-
Resolve duplicate
.so
filesIf you are integrating using Maven, configure the build to prioritize the first matching native library by adding the
packagingOptions
block to your module-levelbuild.gradle
file:android { // ... packagingOptions { pickFirst 'lib/x86/libaosl.so' pickFirst 'lib/x86_64/libaosl.so' pickFirst 'lib/armeabi-v7a/libaosl.so' pickFirst 'lib/arm64-v8a/libaosl.so' } }
-
Rebuild the project
After synchronization is complete, clean and rebuild.
-
When integrating using Cocoapods,, add the following
pre_install
script at the end of yourPodfile
:pre_install do |installer| # Define the path to the AgoraRtm framework rtm_pod_path = File.join(installer.sandbox.root, 'AgoraRtm') # Full path to aosl.xcframework aosl_xcframework_path = File.join(rtm_pod_path, 'aosl.xcframework') # Delete the framework if it exists if File.exist?(aosl_xcframework_path) puts "Deleting aosl.xcframework from #{aosl_xcframework_path}" FileUtils.rm_rf(aosl_xcframework_path) else puts "aosl.xcframework not found, skipping deletion." end end
-
Run
pod install
to reintegrate the SDKs. -
Rebuild the project.