question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in Android APK (DllNotFoundException: mediapipe_jni)

See original GitHub issue

I am running the latest version(v0.8.0) in android. I imported everything in separate project and it is working fine on PC. When I run the apk in my phone (MI note 9 pro) it gives me this error:

2021/12/09 13:14:12.173 13325 13432 Error Unity DllNotFoundException: mediapipe_jni
2021/12/09 13:14:12.173 13325 13432 Error Unity   at (wrapper managed-to-native) Mediapipe.UnsafeNativeMethods.glog_FLAGS_logtostderr(bool)
2021/12/09 13:14:12.173 13325 13432 Error Unity   at Mediapipe.Glog.set_Logtostderr (System.Boolean value) [0x00001] in D:\my-jobs\UnityProjects\ZumbioBasic\Packages\com.github.homuler.mediapipe\Runtime\Scripts\External\Glog.cs:27 
2021/12/09 13:14:12.173 13325 13432 Error Unity   at Mediapipe.Unity.GlobalConfigManager.SetFlags () [0x00001] in D:\my-jobs\UnityProjects\ZumbioBasic\Assets\Mediapipe\Samples\Common\Scripts\GlobalConfigManager.cs:118 
2021/12/09 13:14:12.173 13325 13432 Error Unity   at Mediapipe.Unity.Bootstrap+<Start>d__17.MoveNext () [0x0007d] in D:\my-jobs\UnityProjects\ZumbioBasic\Assets\Mediapipe\Samples\Common\Scripts\Bootstrap.cs:48 
2021/12/09 13:14:12.173 13325 13432 Error Unity   at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00020] in /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17 
2021/12/09 13:14:12.173 13325 13432 Error Unity

It says the issue is in Bootstrap.cs:48 The error is comming from this line: GlobalConfigManager.SetFlags(); Also the AAR was built using Linux Docker and it was working fine with official sample.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Arham-Aalamcommented, Dec 24, 2021

Thanks @homuler It was an Android config issue for arm64 also latest Mediapipe version is working fine with huawei phones as well. Thanks for V0.8.2

1reaction
homulercommented, Dec 16, 2021

WRITE YOUR ENVIRONMENT INFORMATION FIRST (https://github.com/homuler/MediaPipeUnityPlugin/issues/372#issuecomment-995646347).

At the moment, I can think of the following possibilities.

  • This plugin is not imported as a dependent plugin.
    • Check Packages/packages-lock.json.
  • Packages/com.github.homuler.mediapipe/Runtime/Plugins/Android/mediapipe_android.aar is not copied (or is not built in the first place).
  • mediapipe_android.aar is not configured correctly.
    • If you’ve opened UnityEditor before building mediapipe_android.aar, mediapipe_android.aar.meta should have been removed by UnityEditor.
  • Your “Player Settings” have problems (e.g. target architecture is wrong).
Read more comments on GitHub >

github_iconTop Results From Across the Web

DllNotFoundException: Unable to load DLL 'mediapipe_jni' ...
I am using v0.6.2.I removed Library/ ,build and tried apk on device.These are the errors. 0001.01.01 00:00:00.000 ...
Read more >
Analyze your build with the APK Analyzer | Android Studio
Android Studio includes an APK Analyzer that provides immediate insight into the composition of your APK after the build process completes.
Read more >
About Android App Bundles
So, if you encounter this error when publishing your app bundle, use one of the following resources to reduce compressed APK download sizes:....
Read more >
Debug pre-built APKs | Android Studio
To start debugging an APK, follow these steps: From the Android Studio Welcome screen, click Profile or debug APK.
Read more >
Known issues with Android Studio and Android Gradle Plugin
This page tracks known issues with Android Studio Giraffe and Android Gradle plugin 8.1.0. If you experience an issue not already included here, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found