Android Ошибка Studio Flutter с исключением Gradle - PullRequest
0 голосов
/ 10 июля 2020

Я запускаю это на macOS 10.15.5 Catalina. Недавно мне удалось запустить это приложение в эмуляторе quemu e86, но недавно у меня возникли проблемы, и теперь я получаю странные ошибки Gradle. независимо от того, сколько раз я добавляю путь к моему .bash_profile, я не могу запустить flutter doctor или что-нибудь, связанное с flutter, в терминале. Поверьте мне, я просмотрел множество других статей, чтобы попытаться понять это, но пока мне не повезло.

    Launching lib/main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
../../.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 {
                         ^^^^^^^^^^^^^^^^^^^
../../.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 {
                                           ^^^^^^^^^^^^^^^^^^^
../../.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 {
      ^
../../.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 {
               ^
../../.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);
          ^^^^^^^^^^^^^^^^^^^
../../.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' ('../../.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(),
                             ^^^^^^^^^^^^^
../../.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 '/Users/edperez/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 896

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/edperez/Developer/flutter/bin/flutter'' 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 36s
Exception: Gradle task assembleDebug failed with exit code 1

Я схожу с ума. Спасибо!

1 Ответ

0 голосов
/ 10 июля 2020

Возможно, в вашем кэше флаттера есть ошибка. запустите их в своем терминале и посмотрите, могут ли они вам помочь:

flutter pub cache repair 
flutter clean
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...