homuler / MediaPipeUnityPlugin

Unity plugin to run MediaPipe
MIT License
1.84k stars 467 forks source link

Error Unity DllNotFoundException: Unable to load DLL 'mediapipe_jni': The specified module could not be found. #171

Closed llyhong closed 3 years ago

llyhong commented 3 years ago

System information

Describe the problem Please forgive me poor English~ I builded native android libraries in Docker container.

docker build -t mediapipe_unity:ubuntu . -f docker/linux/x86_64/Dockerfile.ubuntu docker run -it --mount type=bind,src=$PWD/Packages,dst=/home/mediapipe/Packages mediapipe_unity:ubuntu python build.py build --android arm64 -v

When i builded project and run the demo scene(DesktopDemo), I am getting the following error.

Error Unity DllNotFoundException: Unable to load DLL 'mediapipe_jni': The specified module could not be found.

Steps to reproduce the issue Provide the exact sequence of commands / steps that you executed before running into the problem.

Full logs image

aar location image

Additional context Add any other context about the problem here.

homuler commented 3 years ago

What is your host machine (where you run UnityEditor)'s OS and which Android device do you use? And will you share the full logs in text format, please?

adb logcat Unity:V native:V tflite:V CRASH:E AndroidRuntime:E "*:S"
llyhong commented 3 years ago

What is your host machine (where you run UnityEditor)'s OS and which Android device do you use? And will you share the full logs in text format, please?

adb logcat Unity:V native:V tflite:V CRASH:E AndroidRuntime:E "*:S"

host machine: window 10 Android device:Meizu M1822 ; Android Version :8.1.0

Full logs 05-21 22:14:47.004 11998 11998 I Unity : onResume 05-21 22:14:47.113 11998 11998 I Unity : windowFocusChanged: true 05-21 22:14:47.126 11998 12020 I Unity : MemoryManager: Using 'Dynamic Heap' Allocator. 05-21 22:14:47.201 11998 12020 I Unity : SystemInfo CPU = ARM64, Cores = 8, Memory = 3473mb 05-21 22:14:47.201 11998 12020 I Unity : 05-21 22:14:47.201 11998 12020 I Unity : SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf) 05-21 22:14:47.201 11998 12020 I Unity : 05-21 22:14:47.202 11998 12020 I Unity : ApplicationInfo com.DefaultCompany.MediaPipeUnityPlugin version 0.1 build ce3d49a9-4ec4-4184-9382-766f1115db42 05-21 22:14:47.202 11998 12020 I Unity : 05-21 22:14:47.202 11998 12020 I Unity : Built from '2020.3/china_unity/release' branch, Version '2020.3.6f1c1 (c884b0ebb9b3)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Disabled' 05-21 22:14:47.202 11998 12020 I Unity : 05-21 22:14:47.439 11998 12020 I Unity : Company Name: DefaultCompany 05-21 22:14:47.439 11998 12020 I Unity : Product Name: MediaPipeUnityPlugin 05-21 22:14:49.822 11998 12020 I Unity : Graph Changed: Face Detection 05-21 22:14:49.822 11998 12020 I Unity : GraphSelectorController:OnValueChanged(Dropdown) 05-21 22:14:49.822 11998 12020 I Unity : 05-21 22:14:49.861 11998 11998 I Unity : onPause 05-21 22:14:50.151 11998 12020 E Unity : DllNotFoundException: Unable to load DLL 'mediapipe_jni': The specified module could not be found. 05-21 22:14:50.151 11998 12020 E Unity : at Mediapipe.SafeNativeMethods.mpSetCustomGlobalPathResolverP (Mediapipe.ResourceManager+PathResolver resolver) [0x00000] in <00000000000000000000000000000000>:0 05-21 22:14:50.151 11998 12020 E Unity : at Mediapipe.ResourceManager..ctor () [0x00000] in <00000000000000000000000000000000>:0 05-21 22:14:50.151 11998 12020 E Unity : at AssetBundleLoader.Start () [0x00000] in <00000000000000000000000000000000>:0 05-21 22:14:50.151 11998 12020 E Unity : 05-21 22:14:50.192 11998 12053 E CRASH : 05-21 22:14:50.192 11998 12053 E CRASH : Version '2020.3.6f1c1 (c884b0ebb9b3)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a' 05-21 22:14:50.192 11998 12053 E CRASH : Build fingerprint: 'Meizu/meizu_M1822_CN/M1822:8.1.0/OPM1.171019.026/1593278966:user/release-keys' 05-21 22:14:50.192 11998 12053 E CRASH : Revision: '0' 05-21 22:14:50.192 11998 12053 E CRASH : ABI: 'arm64' 05-21 22:14:50.192 11998 12053 E CRASH : Timestamp: 2021-05-21 22:14:50+0800 05-21 22:14:50.192 11998 12053 E CRASH : pid: 11998, tid: 12053, name: Thread-4 >>> com.DefaultCompany.MediaPipeUnityPlugin <<< 05-21 22:14:50.192 11998 12053 E CRASH : uid: 10340 05-21 22:14:50.193 11998 12053 E CRASH : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 05-21 22:14:50.193 11998 12053 E CRASH : x0 0000000000000000 x1 0000000000002f15 x2 0000000000000006 x3 0000000000000008 05-21 22:14:50.193 11998 12053 E CRASH : x4 fefefefefeff7164 x5 fefefefefeff7164 x6 fefefefefeff7164 x7 7f7f7f7f7f7f7f7f 05-21 22:14:50.193 11998 12053 E CRASH : x8 0000000000000083 x9 47f3026456edf8f2 x10 0000000000000000 x11 0000000000000001 05-21 22:14:50.193 11998 12053 E CRASH : x12 ffffffffffffffff x13 0000000060a7c05a x14 00082a6d75788600 x15 00006bad4ebf4f95 05-21 22:14:50.193 11998 12053 E CRASH : x16 00000061a000dfa8 x17 0000007ddf28760c x18 871800f8a62f4490 x19 0000000000002ede 05-21 22:14:50.193 11998 12053 E CRASH : x20 0000000000002f15 x21 0000007d39f3da38 x22 ffffff80ffffffc8 x23 0000007d39f3daf0 05-21 22:14:50.193 11998 12053 E CRASH : x24 0000007d39f3d9d0 x25 0000007d39f3da10 x26 0000007c500001cc x27 00000000000027b8 05-21 22:14:50.193 11998 12053 E CRASH : x28 0000007ca03782f0 x29 0000007d39f3d940 05-21 22:14:50.193 11998 12053 E CRASH : sp 0000007d39f3d900 lr 0000007ddf23ce6c pc 0000007ddf23ce88 05-21 22:14:50.193 11998 12053 E CRASH : 05-21 22:14:50.193 11998 12053 E CRASH : backtrace: 05-21 22:14:50.193 11998 12053 E CRASH : #00 pc 000000000001de88 /system/lib64/libc.so (abort+104) (BuildId: 027cece7a15d1460b72313b05a7a8814) 05-21 22:14:50.193 11998 12053 E CRASH : #01 pc 00000000003a31b4 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (std::set_unexpected(void ()())) (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #02 pc 00000000003a3330 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #03 pc 00000000003a05c0 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #04 pc 000000000039fca4 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (__cxa_get_exception_ptr) (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #05 pc 000000000039fc24 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #06 pc 00000000002765b4 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #07 pc 0000000000281cc0 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #08 pc 00000000003fffec /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #09 pc 00000000005a7a20 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #10 pc 00000000002341bc /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:50.193 11998 12053 E CRASH : #11 pc 0000000000f6a31c /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDevice::InsertCustomMarkerCallback(void ()(int), int)+36) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:50.193 11998 12053 E CRASH : #12 pc 00000000013a0f08 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+21788) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:50.193 11998 12053 E CRASH : #13 pc 00000000013a3850 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+44) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:50.193 11998 12053 E CRASH : #14 pc 00000000013a3818 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDeviceWorker::Run()+136) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:50.193 11998 12053 E CRASH : #15 pc 000000000139b7d4 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void)+4) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:50.193 11998 12053 E CRASH : #16 pc 0000000000b074ec /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (Thread::RunThreadWrapper(void)+512) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:50.194 11998 12053 E CRASH : #17 pc 0000000000067e84 /system/lib64/libc.so (pthread_start(void*)+36) (BuildId: 027cece7a15d1460b72313b05a7a8814) 05-21 22:14:50.194 11998 12053 E CRASH : #18 pc 000000000001f2b4 /system/lib64/libc.so (__start_thread+68) (BuildId: 027cece7a15d1460b72313b05a7a8814) 05-21 22:14:53.865 11998 11998 W Unity : Timeout while trying to pause the Unity Engine. 05-21 22:14:53.876 11998 11998 I Unity : windowFocusChanged: false 05-21 22:14:53.885 11998 11998 I Unity : android.permission.CAMERA granted 05-21 22:14:53.886 11998 11998 I Unity : windowFocusChanged: true 05-21 22:14:53.902 11998 11998 I Unity : onResume 05-21 22:14:53.902 11998 11998 E CRASH : other thread is trapped; signum = 6 --------- beginning of crash 05-21 22:14:53.909 11998 11998 E AndroidRuntime: FATAL EXCEPTION: main 05-21 22:14:53.909 11998 11998 E AndroidRuntime: Process: com.DefaultCompany.MediaPipeUnityPlugin, PID: 11998 05-21 22:14:53.909 11998 11998 E AndroidRuntime: java.lang.Error: 05-21 22:14:53.909 11998 11998 E AndroidRuntime: Version '2020.3.6f1c1 (c884b0ebb9b3)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a' 05-21 22:14:53.909 11998 11998 E AndroidRuntime: Build fingerprint: 'Meizu/meizu_M1822_CN/M1822:8.1.0/OPM1.171019.026/1593278966:user/release-keys' 05-21 22:14:53.909 11998 11998 E AndroidRuntime: Revision: '0' 05-21 22:14:53.909 11998 11998 E AndroidRuntime: ABI: 'arm64' 05-21 22:14:53.909 11998 11998 E AndroidRuntime: Timestamp: 2021-05-21 22:14:50+0800 05-21 22:14:53.909 11998 11998 E AndroidRuntime: pid: 11998, tid: 12053, name: Thread-4 >>> com.DefaultCompany.MediaPipeUnityPlugin <<< 05-21 22:14:53.909 11998 11998 E AndroidRuntime: uid: 10340 05-21 22:14:53.909 11998 11998 E AndroidRuntime: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 05-21 22:14:53.909 11998 11998 E AndroidRuntime: x0 0000000000000000 x1 0000000000002f15 x2 0000000000000006 x3 0000000000000008 05-21 22:14:53.909 11998 11998 E AndroidRuntime: x4 fefefefefeff7164 x5 fefefefefeff7164 x6 fefefefefeff7164 x7 7f7f7f7f7f7f7f7f 05-21 22:14:53.909 11998 11998 E AndroidRuntime: x8 0000000000000083 x9 47f3026456edf8f2 x10 0000000000000000 x11 0000000000000001 05-21 22:14:53.909 11998 11998 E AndroidRuntime: x12 ffffffffffffffff x13 0000000060a7c05a x14 00082a6d75788600 x15 00006bad4ebf4f95 05-21 22:14:53.909 11998 11998 E AndroidRuntime: x16 00000061a000dfa8 x17 0000007ddf28760c x18 871800f8a62f4490 x19 0000000000002ede 05-21 22:14:53.909 11998 11998 E AndroidRuntime: x20 0000000000002f15 x21 0000007d39f3da38 x22 ffffff80ffffffc8 x23 0000007d39f3daf0 05-21 22:14:53.909 11998 11998 E AndroidRuntime: x24 0000007d39f3d9d0 x25 0000007d39f3da10 x26 0000007c500001cc x27 00000000000027b8 05-21 22:14:53.909 11998 11998 E AndroidRuntime: x28 0000007ca03782f0 x29 0000007d39f3d940 05-21 22:14:53.909 11998 11998 E AndroidRuntime: sp 0000007d39f3d900 lr 0000007ddf23ce6c pc 0000007ddf23ce88 05-21 22:14:53.909 11998 11998 E AndroidRuntime: 05-21 22:14:53.909 11998 11998 E AndroidRuntime: backtrace: 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #00 pc 000000000001de88 /system/lib64/libc.so (abort+104) (BuildId: 027cece7a15d1460b72313b05a7a8814) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #01 pc 00000000003a31b4 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (std::set_unexpected(void (*)())) (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #02 pc 00000000003a3330 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #03 pc 00000000003a05c0 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #04 pc 000000000039fca4 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (cxa_get_exception_ptr) (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #05 pc 000000000039fc24 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #06 pc 00000000002765b4 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #07 pc 0000000000281cc0 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #08 pc 00000000003fffec /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #09 pc 00000000005a7a20 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #10 pc 00000000002341bc /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libil2cpp.so (BuildId: 287e1594890e004d773926ad94c15c93302eed4c) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #11 pc 0000000000f6a31c /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDevice::InsertCustomMarkerCallback(void ()(int), int)+36) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:53.909 11998 11998 E AndroidRuntime: #12 pc 00000000013a0f08 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+21788) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: #13 pc 00000000013a3850 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+44) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: #14 pc 00000000013a3818 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDeviceWorker::Run()+136) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: #15 pc 000000000139b7d4 /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void)+4) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: #16 pc 0000000000b074ec /data/app/com.DefaultCompany.MediaPipeUnityPlugin-A7xU93tFP6v6saEDCiC9lQ==/lib/arm64/libunity.so (Thread::RunThreadWrapper(void)+512) (BuildId: b738dbfcbf4caa1e1e4e7b45629547c014940063) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: #17 pc 0000000000067e84 /system/lib64/libc.so (__pthread_start(void)+36) (BuildId: 027cece7a15d1460b72313b05a7a8814) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: #18 pc 000000000001f2b4 /system/lib64/libc.so (start_thread+68) (BuildId: 027cece7a15d1460b72313b05a7a8814) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libc.abort(abort:104) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.std::set_unexpected(void (*)())(set_unexpected:0) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.0x3a3330(Native Method) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.0x3a05c0(Native Method) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.__cxa_get_exception_ptr(cxa_get_exception_ptr:0) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.0x39fc24(Native Method) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.0x2765b4(Native Method) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.0x281cc0(Native Method) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.0x3fffec(Native Method) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.0x5a7a20(Native Method) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libil2cpp.0x2341bc(Native Method) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libunity.GfxDevice::InsertCustomMarkerCallback(void ()(int), int)(InsertCustomMarkerCallback:36) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libunity.GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)(RunCommand:21788) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libunity.GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)(RunExt:44) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libunity.GfxDeviceWorker::Run()(Run:136) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libunity.GfxDeviceWorker::RunGfxDeviceWorker(void)(RunGfxDeviceWorker:4) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libunity.Thread::RunThreadWrapper(void)(RunThreadWrapper:512) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libc.__pthread_start(void)(pthread_start:36) 05-21 22:14:53.913 11998 11998 E AndroidRuntime: at libc.__start_thread(start_thread:68)

homuler commented 3 years ago

Logs you attached first (before editing) include the below line.

05-21 21:07:09.372 8217 8252 E Unity : Unable to find mediapipe_android

Can you confirm that your apk include mediapipe_android.aar?

llyhong commented 3 years ago

Logs you attached first (before editing) include the below line.

05-21 21:07:09.372 8217 8252 E Unity : Unable to find mediapipe_android

Can you confirm that your apk include mediapipe_android.aar?

I have library(mediapipe_android.aar) in my project(Packages/com.github.homuler.mediapipe/Runtime/Plugins/Android/mediapipe_android.aar) and i found libmediapipe_jni.so in my apk.but I don't have mediapipe_android.aar in apk.

homuler commented 3 years ago

Hmm...if libmediapipe_jni.so is included, it looks OK to me. Maybe this is the same issue as #167 , but in fact I don't know why this happens, unless libmediapipe_jni.so is somehow broken.

Can you investigate why the app cannot load libmediapipe_jni.so?

When you try loading it manually and fail, you may have a chance to know the cause by reading error messages. To do that, you can use System.loadLibrary (see the official example code) or dlopen and dlerror (you need to annotate them with DllImport["dl"]).

llyhong commented 3 years ago

Hmm...if libmediapipe_jni.so is included, it looks OK to me. Maybe this is the same issue as #167 , but in fact I don't know why this happens, unless libmediapipe_jni.so is somehow broken.

Can you investigate why the app cannot load libmediapipe_jni.so?

When you try loading it manually and fail, you may have a chance to know the cause by reading error messages. To do that, you can use System.loadLibrary (see the official example code) or dlopen and dlerror (you need to annotate them with DllImport["dl"]).

I encountered problem when Load the Library follow the official example code(System.loadLibrary("mediapipe_jni");) ,but crashed due to the lack of "aligned_alloc" symbol. And adding [api_level=21] (https://github.com/google/mediapipe/issues/1224#issuecomment-745190852)solved my problem

ROBYER1 commented 3 years ago

I had a similar issue to this, the cause seemed to be building Mediapipe 0.8.4 in a Unity project with a different package name e.g. com.testapp.app then importing it to another project where we wanted to change the package name to something like com.companyname.newappname. Mediapipe refused to work until we changed back the package name

ROBYER1 commented 3 years ago

I also found this issue when trying to run the app on a Samsung S8 phone which had Android 8 installed, the issue was simply fixed when we updated the phone to Android 9. I am unsure if we should just target min sdk version 28 for android so only 9 and above which could cut off a lot of users.