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

Flutter 3.0 error #57

Open
sircambridge opened this issue May 17, 2022 · 17 comments
Open

Flutter 3.0 error #57

sircambridge opened this issue May 17, 2022 · 17 comments

Comments

@sircambridge
Copy link

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`

@filofan1
Copy link

filofan1 commented May 17, 2022

#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

@Fenardle
Copy link

Having the same issue...

@sircambridge
Copy link
Author

#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!

@filofan1
Copy link

This issue did not occur for me.
Have You tried running flutter pub upgrade ?

@elephantum
Copy link

@filofan1 same here, camera 0.8.1+7 fails to build to on fresh flutter install

@elephantum
Copy link

@filofan1 I forked your fork and updated camera dependency.

Everything seems to compile and work fine.

elephantum@a7d7a59

@elephantum
Copy link

@sircambridge you can try

  url: https://github.com/elephantum/tflite_flutter_helper.git
  ref: a7d7a59a33f7cffa0a2a12ab05625807622cc97a

@filofan1
Copy link

@elephantum Nice
Thanks for the update.

@Sankyuubigan
Copy link

@sircambridge you can try

  url: https://github.com/elephantum/tflite_flutter_helper.git
  ref: a7d7a59a33f7cffa0a2a12ab05625807622cc97a

thanx man.

@saad-palapa
Copy link

@filofan1 any interest in create a new package since this one is abandoned?

@Sankyuubigan
Copy link

@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

@thegioiso
Copy link

@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.

Ashkan-Sarlak added a commit to Ashkan-Sarlak/tflite_flutter_helper that referenced this issue Dec 3, 2022
Ashkan-Sarlak added a commit to Ashkan-Sarlak/tflite_flutter_helper that referenced this issue Dec 3, 2022
See this issue: am15h#57
The mentioned fork upgrades camera to 0.9 which is old for newer projects and creates conflict
@slobodanmilinkovic
Copy link

@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.

@Shahid-Fakhri
Copy link

Kindly help. The above comments did not work for me.

error_capture

@Shahid-Fakhri
Copy link

After downloading the package from git, and directing pubspec.yaml to the local copy, pubspec run successfully but again got this error

image

@neetable-barath
Copy link

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.

BUILD FAILED in 1s
Exception: Gradle task assembleDebug failed with exit code 1

@marc-ko
Copy link

marc-ko commented Aug 16, 2024

Try to change the ext.kotlin_version to 1.5.20 in the tflite_flutter_helper's build.gradle

which should be in %LOCALAPPDATA%\Pub\Cache\hosted\tflite_flutter_helper or if u r using git dependencies it's in \Cache\git\tflite_flutter_helperxxx
(For Mac or Linux is $HOME/. pub-cache)

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