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

while running code getting error #36

Open
supercool27 opened this issue Nov 22, 2021 · 2 comments
Open

while running code getting error #36

supercool27 opened this issue Nov 22, 2021 · 2 comments

Comments

@supercool27
Copy link

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:143:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.

  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:151:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:161:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:171:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:181:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:191:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:201:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:211:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^
    /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.1.0/lib/messages.dart:221:13: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'.
    channel.setMockMessageHandler((dynamic message) async {
    ^^^^^^^^^^^^^^^^^^^^^

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1005

  • 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 58s
Exception: Gradle task assembleDebug failed with exit code 1

@notture
Copy link

notture commented Dec 16, 2021

我也是这种错误,求解决方法

@biostome
Copy link

me too!!

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

3 participants