当我尝试运行代码时显示错误
/C:/src/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) {
^
/C:/src/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.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780
* 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 10m 18s
Finished with error: Gradle task assembleDebug failed with exit code 1
这是一直显示的错误,
我尝试过的东西; 1.我已经完成了颤振升级 2.我已经完成了软件包升级 3.使Android Studio上的缓存无效
此错误在Android Studio IDE上显示
答案 0 :(得分:0)
我之前也遇到过同样的问题,这是由于cached_network_image软件包引起的。您必须使用 2.0.0-rc 版本的cached_network_image来解决此问题。
您可以在此处找到更多详细信息:Issue 270