编译器消息
../../../../Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-1.1.3/lib/src/cached_network_image_provider.dart:42:24:
Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
方法
ImageStreamCompleter load(CachedNetworkImageProvider key) {
^
../../../../Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24:
Context: This is the overridden method ('load').
ImageStreamCompleter load(T key, DecoderCallback decode);
^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
构建失败。
失败:
Build failed with an exception.
* Where:
Script '/home/omelnour/Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/omelnour/Android/flutter_linux_v1.12.13+hotfix.5-stable/flutter/bin/flutter'' 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 7s
Finished with error: Gradle task assembleDebug failed with exit code 1
[这是cached_network_image的较早版本的问题,只需将其更新为cached_network_image的最新版本这是2.0.0,因此在pubspec.yaml
文件中有
[cached_network_image: ^1.1.3
用2.0.0更改1.1.3。