web-dev-qa-db-fra.com

Erreur de scintillement lors de la création de fichiers dans Android Studio

J'ai récemment installé Flutter sur Android Studio. J'avais un code source de flutter que je veux ouvrir en l'utilisant. J'ai installé le dernier plugin Flutter et le SDK Flutter. Mais quand j'essaye d'exécuter le app, il me montre l'erreur suivante:

Compiler message:
/C:/Flutter%20SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.Dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
  PictureStream();
  ^^^^^^^^^^^^^
/C:/Flutter%20SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.Dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
abstract class PictureStreamCompleter extends Diagnosticable {
               ^

Compiler message:
/C:/Flutter%20SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.Dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
  PictureStream();
  ^^^^^^^^^^^^^
/C:/Flutter%20SDK/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.14.4/lib/src/picture_stream.Dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
abstract class PictureStreamCompleter extends Diagnosticable {
               ^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Flutter SDK\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 882

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

Je suis complètement nouveau dans ce domaine et je n'ai aucune idée de l'endroit où cette erreur pointe. J'ai la dernière version du SDK Flutter: Flutter 1.17.0 et Dart 2.8.1, c'est une version stable. Mon Android version Studio est 3.6.2

2
dhruv bhati

Dans mon cas, j'ai résolu ce problème en ajoutant la dernière version de flutter svg à pubspec.yaml

Vérifiez le lien pour installer la dernière version: https://pub.dev/packages/flutter_svg#-installing-tab-

0
Nélzio Sitoe