tflite_flutter_helper
tflite_flutter_helper copied to clipboard
Flutter 3.0 error
I think this is a new error after upgrading to flutter 3.0. when i downgrade to flutter 2.10.5 the error goes away. is this new request permissions something new in flutter 3?
`
Flutter 3.0.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision ee4e09cce0 (7 days ago) • 2022-05-09 16:45:18 -0700 Engine • revision d1b9a6938a Tools • Dart 2.17.0 • DevTools 2.12.2
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [Version 10.0.19044.1706], locale en-US)
X cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.14)
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.67.1)
[√] Connected device (3 available)
[√] HTTP Host Availability
! Doctor found issues in 1 category. PS C:\Users\sirca\OneDrive\Documents\GitHub\tw_food2> flutter run -d emulator-5554 No supported devices found with name or id matching 'emulator-5554'.
The following devices were found:
Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1706]
Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.54
PS C:\Users\sirca\OneDrive\Documents\GitHub\tw_food2> flutter run -d emulator-5554
Using hardware rendering with device sdk gphone64 x86 64. If you notice graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
e: C:\Users\sirca\Downloads\flutter_windows_2.10.5-stable\flutter.pub-cache\hosted\pub.dartlang.org\tflite_flutter_helper-0.3.1\android\src\main\kotlin\com\tfliteflutter\tflite_flutter_helper\TfliteFlutterHelperPlugin.kt: (43, 1): Class 'TfliteFlutterHelperPlugin' is not abstract and does not implement abstract member public abstract fun onRequestPermissionsResult(p0: Int, p1: Array<(out) String!>, p2: IntArray): Boolean defined in io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener
e: C:\Users\sirca\Downloads\flutter_windows_2.10.5-stable\flutter.pub-cache\hosted\pub.dartlang.org\tflite_flutter_helper-0.3.1\android\src\main\kotlin\com\tfliteflutter\tflite_flutter_helper\TfliteFlutterHelperPlugin.kt: (143, 2): 'onRequestPermissionsResult' overrides nothing
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':tflite_flutter_helper:compileDebugKotlin'.
Compilation error. See log for more details
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Get more help at https://help.gradle.org
BUILD FAILED in 8s Running Gradle task 'assembleDebug'... 8.8s Exception: Gradle task assembleDebug failed with exit code 1`
#58 I opened a PR with fix.
You can use this fork until my PR is merged.
tflite_flutter_helper:
git:
url: https://github.com/filofan1/tflite_flutter_helper.git
ref: 783f15e5a87126159147d8ea30b98eea9207ac70
Having the same issue...
#58 I opened a PR with fix.
You can use this fork until my PR is merged.
tflite_flutter_helper: git: url: https://github.com/filofan1/tflite_flutter_helper.git ref: 783f15e5a87126159147d8ea30b98eea9207ac70
thanks for the fix! I tried out your github PR and the issue went away.
now the issue for me is that tflite_flutter_helper depends on camera ^0.8.1+3, which doesnt compile in flutter 3!
This issue did not occur for me. Have You tried running flutter pub upgrade ?
@filofan1 same here, camera 0.8.1+7 fails to build to on fresh flutter install
@filofan1 I forked your fork and updated camera dependency.
Everything seems to compile and work fine.
https://github.com/elephantum/tflite_flutter_helper/commit/a7d7a59a33f7cffa0a2a12ab05625807622cc97a
@sircambridge you can try
url: https://github.com/elephantum/tflite_flutter_helper.git
ref: a7d7a59a33f7cffa0a2a12ab05625807622cc97a
@elephantum Nice Thanks for the update.
@sircambridge you can try
url: https://github.com/elephantum/tflite_flutter_helper.git ref: a7d7a59a33f7cffa0a2a12ab05625807622cc97a
thanx man.
@filofan1 any interest in create a new package since this one is abandoned?
@elephantum Nice Thanks for the update.
GeneratedPluginRegistrant.java:121: error: cannot find symbol flutterEngine.getPlugins().add(new com.tfliteflutter.tflite_flutter_helper.TfliteFlutterHelperPlugin()); ^ symbol: class TfliteFlutterHelperPlugin location: package com.tfliteflutter.tflite_flutter_helper 1 error
FAILURE: Build failed with an exception.
android 12 failed
@sircambridge you can try
url: https://github.com/elephantum/tflite_flutter_helper.git ref: a7d7a59a33f7cffa0a2a12ab05625807622cc97a
Face this error and your repo worked! Thank you so much.
@sircambridge you can try
url: https://github.com/elephantum/tflite_flutter_helper.git ref: a7d7a59a33f7cffa0a2a12ab05625807622cc97a
Thank you! This works on Flutter 3.3.9, camera 0.9.8+1, Android 13 (33), and iOS 16.1. Cool.
Kindly help. The above comments did not work for me.
After downloading the package from git, and directing pubspec.yaml to the local copy, pubspec run successfully but again got this error

FAILURE: Build failed with an exception.
-
What went wrong: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':tflite_flutter_helper' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 1s Exception: Gradle task assembleDebug failed with exit code 1