7mada123 / disposable_cached_images

MIT License
9 stars 4 forks source link

Android build failed with with an exception #5

Closed darkh closed 1 year ago

darkh commented 1 year ago

I am getting the follow error when running on Android, it's works fine on IOS and web

/C:/flutter/.pub-cache/hosted/pub.dartlang.org/disposable_cached_images-1.0.9/lib/cache/cache.dart:65:10: Error: Type 'Uint8List' not found. Future<Uint8List?> getBytes(final String key) async { ^^^^^^^^^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/disposable_cached_images-1.0.9/lib/cache/cache.dart:74:10: Error: Type 'Uint8List' not found. Future getLocalBytes(final String imagePath) async { ^^^^^^^^^ 3 FAILURE: Build failed with an exception.

  • Where: Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156
    • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
7mada123 commented 1 year ago

Hi @darkh

This error seems to be related to the old flutter version because I removed dart: typed_data import to use Uint8List as it isn't necessary in the latest version of flutter.

Can you check which version you are using, it should be 3.3.2.

darkh commented 1 year ago

Yeah after upgrading the flutter version now is working