tflite_flutter_plugin icon indicating copy to clipboard operation
tflite_flutter_plugin copied to clipboard

Failed to load dynamic library

Open yordikurk opened this issue 2 years ago • 1 comments

I have a problem with the tflite dynamic libraries. I ran the install script for Android as described in the initial setup (on both Windows and Mac(x86)) and placed the TensorFlowLiteC.framework in the correct pub-cache folder.

Android The install script generated all the arm64-v8a, armeabi-v7a, x86 and x86_64 folders in ~/android/app/src/main/jniLibs with their libtensorflowlite_c.so files. But it did not generate any libtask_text_jni.so file in any of the folders as described in issue #160. I was able to copy the libtask_text_jni.so in the example application of this repo for arm64-v8a and with this workaround you can run it on Android phones. How can I generate this file for x86 and x86_64, or does anyone have those files so that i can copy them?

iOS When I use the TensorFlowLiteC.framework given on the initial setup-section of this repo, the app won't be able to compile as described in issue #153. When i use this https://github.com/revolut-mobile/TensorFlowLiteC-binary/releases/tag/2.5.0 file, as proposed at the end of issue #153, the app will compile but when I try to use any function of this package it fails with an error message saying that it failed to lookup that function.

For example when I want to create a classifier instance with NLClassifier.createFromAsset('assets/$_modelFile') from the tflite_flutter_helper package I get:

Failed to lookup symbol 'NLClassifierFromFileAndOptions': dlsym(RTLD_DEFAULT, NLClassifierFromFileAndOptions): symbol not found

I think this has something to do with your problem here https://github.com/tensorflow/tensorflow/issues/36766 @am15h

yordikurk avatar Apr 19 '22 14:04 yordikurk

first of click on install.bat file in window and than -> flutter clean -> flutter pub get and than run if this not working see my example https://github.com/Ahmad0Tanveer/object_detection

Ahmad0Tanveer avatar Jan 25 '23 02:01 Ahmad0Tanveer