flutter_tflite icon indicating copy to clipboard operation
flutter_tflite copied to clipboard

the Android V2 embedding

Open urahamat01 opened this issue 2 years ago • 5 comments

To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.

urahamat01 avatar Jun 29 '22 08:06 urahamat01

https://github.com/shaqian/flutter_tflite/pull/230/files this worked for me change your pekage which located $FlutterSDk.pub-cache\hosted\pub.dartlang.org\tflite-1.1.2 and change android build gradle java file and ios file this wil bee work

islom9797 avatar Jul 04 '22 08:07 islom9797

Is it possible to apply this change in the main branch to generate a new version? Or is the project already advanced?

Daniek3d avatar Jul 14 '22 18:07 Daniek3d

Is it possible to apply this change in the main branch to generate a new version? Or is the project already advanced?

you need to change page via flutterSdk/pub-cashes/tflite and change all file as this link

islom9797 avatar Jul 15 '22 00:07 islom9797

@islom9797 it doesn`t work can you help?

EssamSheriff avatar Feb 13 '23 01:02 EssamSheriff

finally, I got the solution the problem was in the Gradle file of the file which has to be changed from compile to API since the new implementation of Gradle 7.0 and up should be changed to either API or implementation, compile =api.

The file in this location in windows

C:\Users\your_username\AppData\Local\Pub\Cache\hosted\pub.dev\tflite-1.1.2\android\build.gradle

or you can use the relative path

%AppData%\Local\Pub\Cache\hosted\pub.dev\tflite-1.1.2\android\build.gradle

If you couldn't find the file path Gradle will print the path copy, paste it into Windows Run, and change the file.

masood0 avatar Mar 01 '23 07:03 masood0