FAILURE: Build failed with an exception.

868 views
Skip to first unread message

I

unread,
May 31, 2020, 2:43:04 PM5/31/20
to Flutter Development (flutter-dev)

I am building a movie streaming app and when I try to run the app, I get this error. Can anyone help?

Compiler message:
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:55:8: Error:
The method 'DioHttpHeaders.add' has fewer named arguments than those of overridden method
'HttpHeaders.add'.
  void add(String name, value) {
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:694:8: Context: This is the overridden
method ('add').
  void add(String name, Object value,
       ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:70:8: Error:
The method 'DioHttpHeaders.set' has fewer named arguments than those of overridden method
'HttpHeaders.set'.
  void set(String name, Object value) {
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:703:8: Context: This is the overridden
method ('set').
  void set(String name, Object value,
       ^
lib/custom_player/src/chewie_player.dart:127:31: Error: No named parameter with the name
'isInitialRoute'.
      settings: RouteSettings(isInitialRoute: false),
                              ^^^^^^^^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/widgets/navigator.dart:458:9: Context: Found this candidate,
but the arguments don't match.
  const RouteSettings({
        ^^^^^^^^^^^^^

Compiler message:
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:55:8: Error:
 The method 'DioHttpHeaders.add' has fewer named arguments than those of overridden method 'HttpHeaders
.add'.
  void add(String name, value) {
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:694:8: Context: This is the overridden met
hod ('add').
  void add(String name, Object value,
       ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/dio-2.2.2/lib/src/dio_http_headers.dart:70:8: Error:
 The method 'DioHttpHeaders.set' has fewer named arguments than those of overridden method 'HttpHeaders
.set'.
  void set(String name, Object value) {
       ^
org-dartlang-sdk:///third_party/dart/sdk/lib/_http/http.dart:703:8: Context: This is the overridden met
hod ('set').
  void set(String name, Object value,
       ^
lib/custom_player/src/chewie_player.dart:127:31: Error: No named parameter with the name 'isInitialRout
e'.
      settings: RouteSettings(isInitialRoute: false),
                              ^^^^^^^^^^^^^^
/C:/src/flutter/packages/flutter/lib/src/widgets/navigator.dart:458:9: Context: Found this candidate, b
ut the arguments don't match.
  const RouteSettings({
        ^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 882

* 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 1m 8s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        70.1s
Exception: Gradle task assembleDebug failed with exit code 1

Suzuki Tomohiro

unread,
May 31, 2020, 2:48:20 PM5/31/20
to I, Flutter Development (flutter-dev)
The error says 
> The method 'DioHttpHeaders.add' has fewer named arguments than those of overridden method

Would you check what are the list if named argument in the overridden method?

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/7ee1c6b4-a95f-4d24-aab1-f89b314d77b8%40googlegroups.com.

Balaji K S

unread,
Apr 29, 2021, 2:06:40 PM4/29/21
to Flutter Development (flutter-dev)
Hi
Did anyone solved this issue? 
Reply all
Reply to author
Forward
0 new messages