HarmonyOS NEXT Player FAQ
This topic describes common issues and solutions for the HarmonyOS NEXT Player SDK.
License-related issues
Resolve invalid or expired license issues in License FAQ.
Common issues across platforms
-
For platform-independent issues, check Cross-platform player FAQs.
-
Experienced developers can also troubleshoot playback errors independently.
Duplicated files found in module error
This error occurs because both the HarmonyOS NEXT Player SDK and the RTC SDK contain libalivcffmpeg.so. To resolve this issue, add the pickFirst option to the build-profile.json5 file in your project as follows:
"buildOption": {
"nativeLibs": {
// Keeps the first .so file found by the build system and ignores subsequent duplicates.
"pickFirst": ["libalivcffmpeg.so"],
}
}App crash on startup after SDK integration
Follow these steps to identify the cause of the issue:
Check the player SDK dependency version. Verify that it is 7.1.0 or later. To troubleshoot, switch to version 7.0.0 and check if the crash persists.
After compiling the project, check if the
libc++_shared.sofile exists in thelibspath of the generated HarmonyOS Ability Package (HAP) file.If the
libc++_shared.sofile is not found in thelibspath, this means the dynamic library was not explicitly integrated. Starting from version 7.1.0, the Alibaba Cloud Player SDK no longer includeslibc++_shared.so. You must add an explicit dependency on ahar packagethat contains this.sofile to your application.Obtain the
har packagecontaininglibc++_shared.sofrom cpplibrary, place it in thelibspath of your project, and add an explicit dependency inoh-package.json5. Rerun the project to resolve the error.
Redirect to a url error
This error may occur if the video source is hijacked. We recommend enabling the player's HTTPDNS feature to resolve this issue. For more information, see Set HTTPDNS for Harmony.