A problem in building the application based on Flutter in Android Studio

344 views Asked by At

I am facing an issue when running my Flutter app in Android Studio. The issue is related to the DecoderCallback type not being found in several packages, including cached_network_image, flutter_blurhash, and flutter_layout_grid.

I have followed the following steps to try and fix the issue:

I checked that I am using the latest version of Flutter. I checked that I am using the latest versions of the packages that are causing the errors. I tried to clear the cached packages and reinstall them. I tried to rebuild the project. None of these steps have resolved the issue.

Is there anything else I can do to try and fix this?

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/cached_network_image-3.2.3/lib/src/image_provider/cached_network_image_provider.dart:78:54: Error: Type 'DecoderCallback' not found.
      image_provider.CachedNetworkImageProvider key, DecoderCallback decode) {
                                                     ^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.

* Where:
Script 'D:\dev\flutter\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1350

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'D:\dev\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 38s
Exception: Gradle task assembleDebug failed with exit code 1
0

There are 0 answers