The plugin flutter_facebook_login uses a deprecated version of the Android embedding. 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. If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration. Launching lib\main.dart on Pixel 6 in debug mode... Running Gradle task 'assembleDebug'... Try correcting the name to the name of an existing method, or defining a method named 'setMockMessageHandler'. channel.setMockMessageHandler((dynamic message) async { ^^^^^^^^^^^^^^^^^^^^^ /C:/SDK/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.2.0/lib/messages.dart:475:15: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.

  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/SDK/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:/SDK/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.2.0/lib/messages.dart:487:15: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/SDK/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:/SDK/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.2.0/lib/messages.dart:499:15: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/SDK/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:/SDK/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.2.0/lib/messages.dart:510:15: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/SDK/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:/SDK/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.2.0/lib/messages.dart:521:15: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/SDK/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:/SDK/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.2.0/lib/messages.dart:532:15: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/SDK/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:/SDK/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_platform_interface-2.2.0/lib/messages.dart:544:15: Error: The method 'setMockMessageHandler' isn't defined for the class 'BasicMessageChannel'.
  • 'BasicMessageChannel' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/SDK/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:\SDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1102

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

Process 'command 'C:\SDK\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 48s Exception: Gradle task assembleDebug failed with exit code 1


Solution 1: Artem Kryakushin

Something is wrong with using the camera module, try to remove it.