簡體   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