HarmonyOS NEXT Player FAQ

更新时间:
复制 MD 格式

This topic describes common issues and solutions for the HarmonyOS NEXT Player SDK.

License issues

For issues such as an invalid or expired license, see License FAQ.

Common issues for players on different clients

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:

  1. 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.

  2. After compiling the project, check if the libc++_shared.so file exists in the libs path of the generated HarmonyOS Ability Package (HAP) file.

  3. If the libc++_shared.so file is not found in the libs path, this means the dynamic library was not explicitly integrated. Starting from version 7.1.0, the Alibaba Cloud Player SDK no longer includes libc++_shared.so. You must add an explicit dependency on a har package that contains this .so file to your application.

  4. Obtain the har package containing libc++_shared.so from cpplibrary, place it in the libs path of your project, and add an explicit dependency in oh-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.