Flutter构建失败

时间:2020-05-23 11:30:16

标签: flutter

昨天,该应用程序已在模拟器和手机上启动。

但是今天什么都没做,什么也没做,也没有改变。 请帮帮我!

Launching lib\main.dart on AOSP on IA Emulator in debug mode...


Compiler message: 
lib/screens/reminder/alarm.dart:98:16: Error: The argument type 'String' can't be assigned to the parameter type 'AndroidNotificationSound'.
 - 'AndroidNotificationSound' is from 'package:flutter_local_notifications/src/platform_specifics/android/notification_sound.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-1.4.3/lib/src/platform_specifics/android/notification_sound.dart').
        sound: 'sd',
               ^
lib/screens/stories.dart:56:29: Error: Method not found: 'StoryItem.pageGif'.
        items.add(StoryItem.pageGif(
                            ^^^^^^^
lib/screens/stories.dart:68:33: Error: Too many positional arguments: 0 allowed, but 2 found.
Try removing the extra positional arguments.
        items.add(StoryItem.text(
                                ^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/story_view-0.12.3/lib/widgets/story_view.dart:52:20: Context: Found this candidate, but the arguments don't match.
  static StoryItem text({
                   ^^^^
lib/screens/stories.dart:77:22: Error: Too many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
          ? StoryView(
                     ^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/story_view-0.12.3/lib/widgets/story_view.dart:397:3: Context: Found this candidate, but the arguments don't match.
  StoryView({
  ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
  PictureStream();
  ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
abstract class PictureStreamCompleter extends Diagnosticable {
               ^

Compiler message:
lib/screens/reminder/alarm.dart:98:16: Error: The argument type 'String' can't be assigned to the parameter type 'AndroidNotificationSound'.
 - 'AndroidNotificationSound' is from 'package:flutter_local_notifications/src/platform_specifics/android/notification_sound.dart' ('/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-1.4.3/lib/src/platform_specifics/android/notification_sound.dart').
        sound: 'sd',
               ^
lib/screens/stories.dart:56:29: Error: Method not found: 'StoryItem.pageGif'.
        items.add(StoryItem.pageGif(
                            ^^^^^^^
lib/screens/stories.dart:68:33: Error: Too many positional arguments: 0 allowed, but 2 found.
Try removing the extra positional arguments.
        items.add(StoryItem.text(
                                ^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/story_view-0.12.3/lib/widgets/story_view.dart:52:20: Context: Found this candidate, but the arguments don't match.
  static StoryItem text({
                   ^^^^
lib/screens/stories.dart:77:22: Error: Too many positional arguments: 0 allowed, but 1 found.
Try removing the extra positional arguments.
          ? StoryView(
                     ^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/story_view-0.12.3/lib/widgets/story_view.dart:397:3: Context: Found this candidate, but the arguments don't match.
  StoryView({
  ^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
  PictureStream();
  ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
abstract class PictureStreamCompleter extends Diagnosticable {
               ^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

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

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\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 11s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

1 个答案:

答案 0 :(得分:0)

尝试“干净清除”命令,然后重新运行您的应用程序