Flutterのバージョンアップ時やXcode Cloud上で「Error: The non-abstract class ‘GradientColor’ is missing implementations for these members:」
今回はFlutterのバージョンアップ時やXcode Cloud上で下記のようなエラーが起きたときの対処法についてご紹介していこうと思います。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
../../.pub-cache/hosted/pub.dev/katana_theme-2.6.8/lib/src/gradient_color.dart:19:7: Error: The non-abstract class 'GradientColor' is missing implementations for these members: - Color.toARGB32 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 GradientColor implements Color { ^^^^^^^^^^^^^ org-dartlang-sdk:///flutter/lib/ui/painting.dart:255:7: Context: 'Color.toARGB32' is defined here. int toARGB32() { ^^^^^^^^ Target kernel_snapshot_program failed: Exception FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'. > Process 'command '/Users/ユーザー名/flutter_development/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 6s |
Flutterのバージョンアップ時やXcode Cloud上で「Error: The non-abstract class 'GradientColor’ is missing implementations for these members:」
結論から言うと、Flutterのダウングレードやライブラリのアップデートが必要です。
Flutterの新しいバージョンでこのエラーを避けたいなら、ライブラリのアップデートをしましょう。
Xcode Cloudを使うためにも、ライブラリのアップデートをおすすめいたします。
終わりに
今回はFlutterのバージョンアップ時やXcode Cloud上で冒頭のようなエラーが起きたときの対処法についてご紹介いたしました。
ディスカッション
コメント一覧
まだ、コメントがありません