Reputation: 231
When I try to build the APK Following shows in the debug console. Build: Build Failed with an exception .
Error in console :
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.3.8/lib/src/datetime_picker_theme.dart:6:28: Error: Type 'DiagnosticableMixin' not found. class DatePickerTheme with DiagnosticableMixin { ^^^^^^^^^^^^^^^^^^^ /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found. class PictureStream with DiagnosticableMixin { ^^^^^^^^^^^^^^^^^^^ /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found. abstract class PictureStreamCompleter with DiagnosticableMixin { ^^^^^^^^^^^^^^^^^^^ /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_datetime_picker-1.3.8/lib/src/datetime_picker_theme.dart:6:7: Error: The type 'DiagnosticableMixin' can't be mixed in. class DatePickerTheme with DiagnosticableMixin { ^ /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:7: Error: The type 'DiagnosticableMixin' can't be mixed in. class PictureStream with DiagnosticableMixin { ^ /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:16: Error: The type 'DiagnosticableMixin' can't be mixed in. abstract class PictureStreamCompleter with DiagnosticableMixin { ^ /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:167:11: Error: Superclass has no method named 'debugFillProperties'. super.debugFillProperties(properties); ^^^^^^^^^^^^^^^^^^^ /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:171:30: Error: The method 'toStringShort' isn't defined for the class 'PictureStreamCompleter'.
- 'PictureStreamCompleter' is from 'package:flutter_svg/src/picture_stream.dart' ('/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart'). Try correcting the name to the name of an existing method, or defining a method named 'toStringShort'. ifPresent: _completer?.toStringShort(), ^^^^^^^^^^^^^ /C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:266:11: Error: Superclass has no method named 'debugFillProperties'. super.debugFillProperties(description); ^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where: Script 'C:\src\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 896
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\src\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 1m 12s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
Upvotes: 16
Views: 12328
Reputation: 1
I found the solution go check this link. I upgraded the Flutter and dart to latest version, at the end I got a good result.
Upvotes: 0
Reputation: 19
This solved the issue for me, use this flutter_svg: ^0.20.0-nullsafety
in your pubspec.yaml file dependency list.
Upvotes: 0
Reputation: 587
Try to write the package like this:
flutter_svg: ^0.20.0-nullsafety
Upvotes: 3
Reputation: 179
To solve this is done the following updates in pubspec.yaml
Flutter_svg: ^0.18.0
flutter_html: ^1.0.2
flutter_widget_from_html: 0.4.3
Most errors by this three dependencies
Upvotes: 1
Reputation: 79
To change dependency:
flutter_svg: ^0.17.4 to flutter_svg: ^0.18.0
Then,
flutter pub get
flutter clean
Then, Run
Upvotes: 5
Reputation: 2187
I had the exact same error like you did and the solution for me was to update my flutter_svg packages to its latest version. So I recommand you to go into your pubspec.yaml and do following under dependencies:
flutter_svg: 0.18.0
Then run pub get and hopefully the error should disappear.
Upvotes: 8