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:
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
- Using Maven
-
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
-
Rebuild the project.
- Add the
packagingOptions
node to theandroid
node in thebuild.gradle
file to specify that the first matching file is preferred during the build process: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' } }
- After the Gradle file synchronization is complete, rebuild the project.
IOS SDK
Depending on your integration method, follow the corresponding solution below:
- Using CDN
- Using CocoaPods
- Manually delete the
libs/aosl.xcframework
file in the SDK package. - Rebuild the project.
-
Add this script to the end of your project's
Podfile
:pre_install do |installer| # Define the path for 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') # Check if the file exists, and if it does, delete it 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 RTM and RTC SDK. -
Rebuild the project.
Flutter SDK
Depending on your target platform, select the corresponding solution below:
- Android
- iOS
- When integrating with Maven, add a node to the
build.gradle
file to ensure the build process prioritizes the first matching file. Use theandroid.packagingOptions
node for this: - After the Gradle file sync completes, rebuild your project.
- When integrating with CocoaPods, add the following script at the end of your project's
Podfile
:pre_install do |installer| # Define the path for the AgoraRtm framework rtm_pod_path = File.join(installer.sandbox.root, 'AgoraRtm') # Full path of aosl.xcframework aosl_xcframework_path = File.join(rtm_pod_path, 'aosl.xcframework') # Check if the file exists, and if so, delete it 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 RTM and RTC SDKs. - Rebuild the project.