pub.flutter-io.cn/extended_image-0.5.5/lib/extended_image.dart
file:///Users/admin/.pub-cache/hosted/pub.flutter-io.cn/extended_image-0.5.5/lib/extended_image.dart:18:1: Error: Error when reading 'file:///Users/admin/.pub-cache/hosted/pub.flutter-io.cn/extended_image_library-0.1.4/lib/extended_image_library.dart': No such file or directory
export 'package:extended_image_library/extended_image_library.dart';
file:///Users/admin/.pub-cache/hosted/pub.flutter-io.cn/extended_image-0.5.5/lib/src/extended_image.dart:9:8: Error: Error when reading 'file:///Users/admin/.pub-cache/hosted/pub.flutter-io.cn/extended_image_library-0.1.4/lib/extended_image_library.dart': No such file or directory
import 'package:extended_image_library/extended_image_library.dart';
^
file:///Users/admin/.pub-cache/hosted/pub.flutter-io.cn/extended_image-0.5.5/lib/src/extended_image.dart:102:17: Error: Method not found: 'ExtendedNetworkImageProvider'.
image = ExtendedNetworkImageProvider(url,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
file:///Users/admin/.pub-cache/hosted/pub.flutter-io.cn/extended_image-0.5.5/lib/src/extended_image.dart:102:17: Error: The method 'ExtendedNetworkImageProvider' isn't defined for the class 'ExtendedImage'.
- 'ExtendedImage' is from 'package:extended_image/src/extended_image.dart' ('file:///Users/admin/.pub-cache/hosted/pub.flutter-io.cn/extended_image-0.5.5/lib/src/extended_image.dart').
Try correcting the name to the name of an existing method, or defining a method named 'ExtendedNetworkImageProvider'.
image = ExtendedNetworkImageProvider(url,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
file:///Users/admin/.pub-cache/hosted/pub.flutter-io.cn/extended_image-0.5.5/lib/src/extended_image.dart:692:25: Error: 'ExtendedNetworkImageProvider' isn't a type.
if (widget.image is ExtendedNetworkImageProvider &&
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compiler failed on /Users/admin/AndroidStudioProjects/flutter_module/lib/main.dart
FAILURE: Build failed with an exception.
* Where:
Script '/Users/admin/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 665
* What went wrong:
Execution failed for task ':flutter:compileflutterBuildDebugArm64'.
> Process 'command '/Users/admin/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 8s
Finished with error: Gradle task assembleDebug failed with exit code 1
解决办法:https://github.com/fluttercandies/extended_image/issues/89
较新的extended_image(自0.5.3起)包含了一些非向前兼容的改动,使得该依赖无法在Flutter SDK版本低于1.7.8(稳定版)的环境下使用。
若您需要在低于SDK版本低于1.7.8(比如1.5.4)的环境下使用该依赖,必须在pubspec.yaml内同时指定extended_image和extended_image_library为指定或更低的版本,如代码所示。
我们仍然强烈建议您使用最新的稳定渠道的Flutter SDK。
extended_image for v1.7.8
extended_image: 0.5.5
extended_image_library: 0.1.4