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

Failed to load dynamic library 'libonnxruntime.so': dlopen failed: library "libonnxruntime.so" not found #28

Open
HalaHamdi opened this issue Nov 2, 2024 · 0 comments

Comments

@HalaHamdi
Copy link

I spent some time trying to run the example app but this error does not seem to be easy to solve.

Checking the path were libonnxruntime.so should have been downloaded: C:\Users\hp\AppData\Local\Pub\Cache\hosted\pub.dev\onnxruntime-1.4.1\android\src\main\jniLibs
I was able to find the file in both folders in this directory, but somehow it was not recognized by Flutter.

This is the stack trace.

#0      _open (dart:ffi-patch/ffi_dynamic_library_patch.dart:11:43)
#1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart:22:12)
#2      _dylib.<anonymous closure> (package:onnxruntime/src/bindings/bindings.dart:7:27)
#3      _dylib (package:onnxruntime/src/bindings/bindings.dart:27:2)
#4      _dylib (package:onnxruntime/src/bindings/bindings.dart)
#5      onnxRuntimeBinding (package:onnxruntime/src/bindings/bindings.dart:30:48)
#6      onnxRuntimeBinding (package:onnxruntime/src/bindings/bindings.dart)
#7      OrtEnv.version (package:onnxruntime/src/ort_env.dart:71:32)
#8      _MyAppState.initState (package:onnxruntime_example/main.dart:29:23)
#9      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5762:55)
#10     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5607:5)
...     Normal element mounting (63 frames)
#73     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4480:16)
#74     Element.updateChild (package:flutter/src/widgets/framework.dart:3963:18)
#75     _RawViewElement._updateChild (package:flutter/src/widgets/view.dart:465:16)
#76     _RawViewElement.mount (package:flutter/src/widgets/view.dart:488:5)
...     Normal element mounting (15 frames)
#91     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4480:16)
#92     Element.updateChild (package:flutter/src/widgets/framework.dart:3963:18)
#93     RootElement._rebuild (package:flutter/src/widgets/binding.dart:1636:16)
#94     RootElement.mount (package:flutter/src/widgets/binding.dart:1605:5)
#95     RootWidget.attach.<anonymous closure> (package:flutter/src/widgets/binding.dart:1558:18)
#96     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3038:19)
#97     RootWidget.attach (package:flutter/src/widgets/binding.dart:1557:13)
#98     WidgetsBinding.attachToBuildOwner (package:flutter/src/widgets/binding.dart:1296:27)
#99     WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:1278:5)
#100    WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:1264:7)
#104    _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
(elided 3 frames from class _Timer and dart:async-patch) ```

Any help would be appreciated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant