我的应用程序没有建立,因为这个错误,我不能理解的错误。我尝试了“flutter升级”和“flutter获取”,但没有任何帮助。
Launching lib/main.dart on SM A127F in debug mode...
Running Gradle task 'assembleDebug'...
../../flutter/.pub-cache/hosted/pub.dartlang.org/fwfh_text_style-2.7.3+2/lib/fwfh_text_style.dart:11:7: Error: The non-abstract class 'FwfhTextStyle' is missing implementations for these members:
- TextStyle.fontVariations
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class FwfhTextStyle extends _TextStyleProxy {
^^^^^^^^^^^^^
../../flutter/packages/flutter/lib/src/painting/text_style.dart:789:33: Context: 'TextStyle.fontVariations' is defined here.
final List<ui.FontVariation>? fontVariations;
^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script '/home/vrs/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1159
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/home/vrs/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 16s
Exception: Gradle task assembleDebug failed with exit code 1
5条答案
按热度按时间wnvonmuf1#
在我升级到Flutter
3.3.0
后,这个错误出现在我面前经过一些搜索,我解决了它运行升级包在我的项目
然后
ghg1uchk2#
请通过升级依赖项
flutter pub upgrade fwfh_text_style
进行尝试ctehm74n3#
我想这是关于
final List<ui.FontVariation>? fontVariations;
的定义无论是在最后一个索引中定义还是根本没有定义。
我会做类似的事情来防止错误。
List<ui.FontVariation> fontVariations = [];
kx5bkwkv4#
我尝试了
flutter upgrade
,然后flutter clean
,但它对我不起作用。然后我运行这个命令
flutter pub outdated
,它运行得很好。pb3s4cty5#
尝试添加fwfh_text_style这个插件在您的项目中,如果没有添加。它为我工作。