Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

DllNotFoundException: libUIWidgets #174

Closed
Stefan2016 opened this issue Jun 1, 2021 · 19 comments
Closed

DllNotFoundException: libUIWidgets #174

Stefan2016 opened this issue Jun 1, 2021 · 19 comments
Labels
question Further information is requested

Comments

@Stefan2016
Copy link

Stefan2016 commented Jun 1, 2021

Hi there,

I am using Unity 2019.4.27f1. When I try the simple example with Panel and the script which needs to be added I receive an error DllNotFoundException: libUIWidgets.

Set up:
Windows 10,
Unity 2019.4.27f1,
com.unity.uiwidgets 2.0.2-preview.1

On a side note I changed the script name from UIWidgetsExample.cs to CountDemo.cs, as I received an "Can't Add Script component to GameObject"-error.

Thanks!

@zhuxingwei
Copy link
Contributor

zhuxingwei commented Jun 2, 2021

Hi Stefan,

Thanks for your feedback. Please make sure that (1) uiwidgets package reference is correctly set in the manifest file; (2) there is a libUIWidgets.dll file under Runtime/Plugin/x86_64/. For a quick check, you can try to open a sample scene inside the UIWidgetsSamples_2019_4 project.

Btw, please note that uiwidgets 2.0.2 is only available on Unity 2019.4.26f1c1 and above, so you need to use Unity 2019.4.27f1c1 to open your project. If you are not located in China, please download the editor from the Unity China site.

@zhuxingwei zhuxingwei added the question Further information is requested label Jun 2, 2021
@Stefan2016
Copy link
Author

Hi Stefan,

Thanks for your feedback. Please make sure that (1) uiwidgets package reference is correctly set in the manifest file; (2) there is a libUIWidgets.dll file under Runtime/Plugin/x86_64/. For a quick check, you can try to open a sample scene inside the UIWidgetsSamples_2019_4 project.

Btw, please note that uiwidgets 2.0.2 is only available on Unity 2019.4.26f1c1 and above, so you need to use Unity 2019.4.27f1c1 to open your project. If you are not located in China, please download the editor from the Unity China site.

Thanks a lot.

As I am using Unity 2019.4.27f1 I will try the switch to Unity 2019.4.27f1_c1_ first.

Any chance that UI widgets will also be available for Unity 2021 global reason? May I ask what's the reason for it?

@Stefan2016
Copy link
Author

Update:

I switched to Unity 2019.4.27f1c1, but there is still the DllNotFoundException: libUIWidgets error showing.

I have checked the manifest file under: projectName\packages\manifest.json

grafik

Looks good to me?

You have mentioned

(2) there is a libUIWidgets.dll file under Runtime/Plugin/x86_64/

Where do I find this folder?

Thanks and cheers.

@YiJiu-Li
Copy link

YiJiu-Li commented Jun 3, 2021

2019.4.6f1 也报这个错误

@zhuxingwei
Copy link
Contributor

Hi, thanks for the response @Stefan2016

I am not sure about your manifest file since I don't know the project structure of yours. However, I can give you a correct setup:

Assume your project is ProjectA and you cloned uiwidgets aside it as follows:

----SomeRootPath
------- ProjectA
-----------Assets
-----------Packages
-----------...
------- com.unity.uiwidgets
-----------com.unity.uiwidgets
--------------Runtime
-----------------Plugins
-------------------x86_64
-----------------------libUIWidgets.dll
-----------------------...
------------...

Then you need to set the manifest reference as:
"com.unity.uiwidgets": "file:../../com.unity.uiwidgets/com.unity.uiwidgets"

For your second question, you can find the correct path of libUIWidgets.dll in the above directory tree.

@a1228267639 Please use Unity 2019.4.26f1c1 or newer (for now, only Unity 2019.4.26f1c1 and Unity 2019.4.27f1c1) if you want to use uiwidgets.

Thanks !

@rmbassman
Copy link

I am also got this error "DllNotFoundException: libUIWidgets" in macos .So I run the project in windows,got another Error :

"Failed to load 'C:/Users/davy1/Documents/com.unity.uiwidgets-2.0.2/com.unity.uiwidgets-2.0.2/com.unity.uiwidgets/Runtime/Plugins/x86_64/libUIWidgets.dll', expected x64 architecture, but was Unknown architecture. You must recompile your plugin for x64 architecture."
but the direction of libUIWidgets.dll is in "X86_64", what I can do?

@zhuxingwei
Copy link
Contributor

zhuxingwei commented Jun 23, 2021

Thanks for the report !

What Unity version do you use? It must be 2019.4.26f1c1 or Unity 2019.4.27f1c1.

In case your project settings are not correct, you can do a quick check by opening any scene inside our sample project UIWidgetsSamples_2019_4 project and see if the error messages are gone?

@rmbassman
Copy link

rmbassman commented Jun 23, 2021

I resolve it~
First,The project must got from “Git clone”. If got from release, would got the error.
Second, the project must run in unity2019.4.26f1c1 or above, in unity2019.4

@zhuxingwei
Copy link
Contributor

Sorry for this issue. It seems the release 2.0.2 is broken. We will fix this later.

Thanks for reporting and happy coding with UIWidgets @rmbassman !

@stevenbajer
Copy link

I use Unity 2020.3.11f1 (64-bit) to build some sample find two issues. The first one:libUIWidgets.dll not found, expected x64 architecture, but was Unknown architecture. You must recompile your plugin. The second is when I compile with xcode on macbook, there are a lot of undefined symbols linked error for architecture arm64. First symbol is __List_Free symboles in Unity.UIWidget8.o lib.

Set up:
Windows 10,
Unity 2020.3.11f1 (64-bit) ,
com.unity.uiwidgets 2.0.3-preview.1

@stevenbajer
Copy link

How to complie the UIWidgetlib plugin to x64 arch? thanks a lot!

@zhuxingwei
Copy link
Contributor

Thanks for the reporting @stevenbajer !

Please note that currently uiwidgets can only be used on Unity 2019.4 LFS Chinese version (e.g., 2019.4.26f1c1, 2019.4.27f1c1 and 2019.4.28f1c1). If the problem still exists after you switching to these versions, please share your demo project via github with us and we will look into it and find out what is going wrong.

Yes, you can compile uiwidgets library using our build scripts, which can be found under engine/Scripts/, you can use "python3 lib_build.py --help" to get a how-to guideline.

@stevenbajer
Copy link

stevenbajer commented Jul 7, 2021

I switched to unity version 2019.4.26f1c1. The sample code seem to be OK. I complie code to Android and success to got the APK package. But complier to IOS version and I got some error message below:
1,Build completed with a result of 'Failed' in 1 seconds (510 ms) UnityEngine.GUIUtility:ProcessEvent (int,intptr)
2,UnityEditor.BuildPlayerWindow+BuildMethodException: Error building Player because scripts have compile errors in the editor
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bf] in :0
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in :0
UnityEngine.GUIUtility:ProcessEvent (int,intptr)。

Could you give me some advices how to resolve this issues? Thank a lot

@stevenbajer
Copy link

Hi, Xing wei, could you have any plan for UIWidget adapting to Unity 2020.3. or later? Thanks a lot!

@zhuxingwei
Copy link
Contributor

Since the error message is "Error building Player because scripts have compile errors in the editor", you should check the debug console of Editor and fix the compile errors shown there.

Yes, we are already beginning to add support to Unity 2020.3LTS (but Chinese version only for now). We will update the Readme file when it is done.

@stevenbajer
Copy link

Hi, Zhuxingwei.

Thank you very much! I located in Beijing of China and would like to use Chinese version. Could you tell me about approximate time of completion?

@zhuxingwei
Copy link
Contributor

Before this September if everything goes well.

@yixuan2009
Copy link

你好,我运行UIWidgetsSamples_2019_4工程也出现以上问题了,使用的是Unity2019.4.27f1c1,请问怎么解决?DllNotFoundException: libUIWidgets
Unity.UIWidgets.engine.UIWidgetsPanelWrapper.Initiate (Unity.UIWidgets.engine.IUIWidgetsWindow host, System.Int32 width, System.Int32 height, System.Single dpr, Unity.UIWidgets.engine.Configurations _configurations) (at /Users/shaochunhui/Desktop/MyUnityWorkspace/com.unity.uiwidgets/com.unity.uiwidgets/Runtime/engine/UIWidgetsPanelWrapper.cs:170)
Unity.UIWidgets.engine.UIWidgetsPanel.OnEnable () (at /Users/shaochunhui/Desktop/MyUnityWorkspace/com.unity.uiwidgets/com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs:337)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

@zhuxingwei
Copy link
Contributor

Hi Thanks for the reporting !

Since this issue is frequently encountered by developers, we listed it in our FAQ as the first question. Could you please make some more checks accordingly first and give us your further feedbacks if the problem still exists.

Thanks !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants