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

DllNotFoundException: Unable to load DLL 'mediapipe_jni'. Tried the load the following dynamic libraries: Unable to load dynamic library 'mediapipe_jni' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "mediapipe_jni" not found #600

Closed
HiddenStar0412 opened this issue Jun 6, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists platform:android Issue that occurs when the target platform is Android type:support Support issue

Comments

@HiddenStar0412
Copy link

Plugin Version or Commit ID

v0.10.0

Unity Version

2021.3.3f1

Your Host OS

mac OS Montrery 12.4

Target Platform

Android

Description

You have successfully built a library for Android on Intel Mac and attempted to build a sample on Unity.
However, DllNotFoundException occurs on my device.
My test device is Asus Z017DA.
As you can see in logcat, the cpu of the device is arm64.

It seems to work properly on other devices.
I tested it by building it in both modes, arm64 and fat, but it is the same result.

When attempting the load library, an error like the attached image is displayed.
What do you think is the cause?

Thanks

https://drive.google.com/file/d/1TsFRFM5FKMWeq2J2SbDc1MhATf9i6S-8/view?usp=sharing

Code to Reproduce the issue

public class LibTester : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
LoadLibrary();
}

public void LoadLibrary()
{
using (var system = new AndroidJavaClass("java.lang.System"))
{
system.CallStatic("loadLibrary", "mediapipe_jni");
}
}
}

Additional Context

https://drive.google.com/file/d/116sJQiqA5cR2pg8UDJR1ARR9nD1T1zAI/view?usp=sharing

@HiddenStar0412 HiddenStar0412 added the type:support Support issue label Jun 6, 2022
@homuler homuler added duplicate This issue or pull request already exists platform:android Issue that occurs when the target platform is Android labels Jun 6, 2022
@homuler
Copy link
Owner

homuler commented Jun 6, 2022

Duplicates #171.

See https://github.com/homuler/MediaPipeUnityPlugin/wiki/Installation-Guide#android-configuration and #536 (comment).

To support older Android, you need to specify the API level for NDK when running build.py.
Otherwise, some symbols in libmediapipe_jni.so cannot be resolved and DllNotFoundException will be thrown at runtime.

@homuler homuler closed this as completed Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists platform:android Issue that occurs when the target platform is Android type:support Support issue
Projects
None yet
Development

No branches or pull requests

2 participants