Flutter - build failed in

124 views Asked by At

run code after one year then face this issue when flutter run command then command response error how can remove these error also run command flutter create -t app

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_math_fork-0.3.3+1/lib/src/widgets/selectable.dart:407:7: Error: The non-abstract class 'InternalSelectableMathState' is missing implementations for these members:

  • TextSelectionDelegate.copySelection
  • TextSelectionDelegate.cutSelection
  • TextSelectionDelegate.pasteText
  • TextSelectionDelegate.selectAll Try to either
  • provide an implementation,
  • inherit an implementation from a superclass or mixin,
  • mark the class as abstract, or
  • provide a 'noSuchMethod' implementation.

class InternalSelectableMathState extends State ^^^^^^^^^^^^^^^^^^^^^^^^^^^ /C:/src/flutter/packages/flutter/lib/src/services/text_input.dart:1034:8: Context: 'TextSelectionDelegate.copySelection' is defined here. void copySelection(SelectionChangedCause cause); ^^^^^^^^^^^^^ /C:/src/flutter/packages/flutter/lib/src/services/text_input.dart:1014:8: Context: 'TextSelectionDelegate.cutSelection' is defined here. Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102

  • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • 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 25s Running Gradle task 'assembleDebug'... 26.1s Exception: Gradle task assembleDebug failed with exit code 1

1

There are 1 answers

0
Inf0rmatix On

Well, I hate bringing you bad news, but Flutter received a LOT of updates. You might want to either

  • Use an older version of Flutter (see: THIS LINK)
  • Refactor your code to adhere to the changes