繁体   English   中英

Awesome notification V0.7.1 构建失败

[英]Awesome notification V0.7.1 fails to build

我遇到了这个问题,选项用完了,我尝试了下面链接中提到的所有解决方案,但没有成功

如何解决 Execution failed for task ':app:compileFlutterBuildDebug'

/C:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/awesome_notifications-0.7.1/lib/src/utils/resource_image_provider.dart:41:26: Error: Type 'DecoderBufferCallback' not found.
      ResourceImage key, DecoderBufferCallback decode) {
                         ^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/awesome_notifications-0.7.1/lib/src/utils/resource_image_provider.dart:49:26: Error: Type 'DecoderBufferCallback' not found.
      ResourceImage key, DecoderBufferCallback decode) async {
                         ^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/awesome_notifications-0.7.1/lib/src/utils/resource_image_provider.dart:22:7: Error: The non-abstract class 'ResourceImage' is missing implementations for these members:
 - ImageProvider.load
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 ResourceImage extends ImageProvider<ResourceImage> {
      ^^^^^^^^^^^^^
/C:/flutter/flutter/packages/flutter/lib/src/painting/image_provider.dart:567:24: Context: 'ImageProvider.load' is defined here.
  ImageStreamCompleter load(T key, DecoderCallback decode);
                       ^^^^
/C:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/awesome_notifications-0.7.1/lib/src/utils/resource_image_provider.dart:41:26: Error: 'DecoderBufferCallback' isn't a type.
      ResourceImage key, DecoderBufferCallback decode) {
                         ^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/awesome_notifications-0.7.1/lib/src/utils/resource_image_provider.dart:49:26: Error: 'DecoderBufferCallback' isn't a type.
      ResourceImage key, DecoderBufferCallback decode) async {
                         ^^^^^^^^^^^^^^^^^^^^^


FAILURE: Build failed with an exception.

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

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

在此处输入图像描述 基本上,很棒的通知试图从 flutter 库访问“DecoderBufferCallback”变量,但遗憾的是在 flutter 库中,他们将该变量名称更改为“DecoderCallback”...

所以你需要实际编辑 AwesomeNotifications 库代码中的变量名,从“DecoderBufferCallback”到“DecoderCallback”。这是他们的工作,但我们正在为他们做

PS:我知道这个屏幕截图中的 awesoome 通知版本较旧,但我只是想展示在哪里进行编辑...所以我打开了一个较旧的项目

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM