Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.75k stars 805 forks source link

[BUG] kernel_snapshot failed: Exception after updating Flutter #1399

Closed MAlazhariy closed 5 months ago

MAlazhariy commented 5 months ago
pubspec.yaml ``` environment: sdk: '>=3.2.3 <4.0.0' dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.6 wakelock_plus: ^1.1.4 flutter_html: ^2.2.1 html: ^0.15.4 ... dependency_overrides: flutter_math_fork: ^0.7.2 flutter_layout_grid: ^2.0.5 chewie_audio: ^1.5.0 flutter_svg: ^2.0.9 chewie: ^1.7.4 ```

Describe the bug: After updating Flutter, whenever I try to run the app it doesn't build the app and throws this error:

/C:/Users/*/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_html-2.2.1/lib/image_render.dart:7:8: Error: Error when reading '/C:/Users/*/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_svg-2.0.9/lib/parser.dart': The system cannot find the file specified.

import 'package:flutter_svg/parser.dart';
       ^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

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

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

Device details and Flutter/Dart/flutter_html versions:

Problem Solution: