3
votes

Compiler message: ../../../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) { ^ ../../../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 '/Users/shutter/Desktop/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780

  • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

    Process 'command '/Users/shutter/Desktop/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 1s Finished with error: Gradle task assembleDebug failed with exit code 1

2
Any solution to solve the problem above? - Sopheadavid Sopheap
run flutter doctor and show me what happens. if you have android studio. open the android directory in android studio also - Salma.
Salma: It's seem like nothing error. - Sopheadavid Sopheap

2 Answers

2
votes

Just replace cached_network_image:1.1.3 with cached_network_image: ^2.0.0-rc in your pubspec.yaml file, refer this for more.

0
votes

Flutter v1.12.13 is having issues

I have resolved this issue by doing following changes

  1. Switch to master channel of flutter
  2. Update flutter to 1.13.5
  3. created new project
  4. copy paste old files into new project
  5. Voila it's worked