Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getTransport: Cannot find entry [email protected]::IHwcInterface/default in either framework or device manifest #524

Open
alexanderbelousov25 opened this issue Nov 19, 2024 · 2 comments
Assignees
Labels
waiting for confirmation The solution has been given

Comments

@alexanderbelousov25
Copy link

alexanderbelousov25 commented Nov 19, 2024

Describe the bug & problem
App crush on start with errors :
getTransport: Cannot find entry [email protected]::IHwcInterface/default in either framework or device manifest.
IHwcInterfaceClient::tryGetService failed!
312284_externalLog_huawei2_v1.txt

Environment:

  • Unity3d 2021.3.42f1
  • HMSUnityPackageV2.3.9-2019-2020-2021-2022

Smartphone:

  • Device: HUAWEI MatePad SE 11 (16:10) / HarmonyOS 2.0
@github-actions github-actions bot added the new label Nov 19, 2024
Copy link

Thank you for reporting this issue/advice.

We will get back to you as soon as possible.
Would you like to star our plugin to support us? ✨

@htk007 htk007 added the investigating We are investigating the current problem label Dec 4, 2024
@htk007
Copy link
Collaborator

htk007 commented Dec 4, 2024

Hi @alexanderbelousov25 , Looking at your logs, I understand you're encountering a graphics interface initialization error with the HMS Unity Plugin on your MatePad SE 11. Let me help explain what's happening and provide some solutions.

The error occurs when the HMS Plugin attempts to initialize the hardware graphics interface on HarmonyOS 2.0. This is particularly common on tablet devices due to their different screen configurations and how HarmonyOS handles hardware abstraction layers.

There are a few potential solutions you can try:

Solution 1 - Update HMS Core Settings
First, ensure your HMS Core and related services are up to date through AppGallery on your MatePad. This is crucial as outdated services can cause initialization failures.

Solution 2 - Implement HMS Tablet Configuration
In your HMS initialization script, add specific tablet device handling:

using HuaweiMobileServices.Utils;
using UnityEngine;

public class HMSInitializer : MonoBehaviour
{
    void Start()
    {
        Screen.fullScreen = true;
        
        try
        {
            var config = new HMSConfig();
            config.SetTabletConfig(true);
            HuaweiMobileServicesUtil.SetApplication(config);
            Debug.Log("HMS Core initialized successfully");
        }
        catch (System.Exception e)
        {
            Debug.LogError($"HMS Init Error: {e.Message}");
        }
    }
}

Solution 3 - Update AndroidManifest Configuration
Add the following to your AndroidManifest.xml to properly handle tablet mode:

<meta-data
    android:name="com.huawei.hms.client.screenmode"
    android:value="tablet" />

After implementing these changes:

  1. Clean your Unity project (delete Library and Temp folders)
  2. Rebuild your project
  3. Deploy to your device

If you're still experiencing issues after trying these solutions, please share any new error messages you encounter. I'll be happy to help further troubleshoot the problem.

Let me know how these solutions work for you!

Best regards

@htk007 htk007 added waiting for confirmation The solution has been given and removed new investigating We are investigating the current problem labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for confirmation The solution has been given
Projects
None yet
Development

No branches or pull requests

3 participants