Fails: flutter packages pub run build_runner build

1,061 views
Skip to first unread message

hoek

unread,
Jan 25, 2019, 7:12:07 PM1/25/19
to Flutter Dev
Hi,
anyone know what to do about this failing:
$flutter packages pub run build_runner build
?
Maybe update some tool?

Thanks for any and all help.


Errors:

 Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:1424:7: Context: Override was introduced when the mixin 'ErroneousExpressionGenerator' was applied to 'KernelGenerator'.
class KernelUnresolvedNameGenerator extends KernelGenerator
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/expression_generator.dart:894:14: Error: The method 'ContextAwareGenerator::buildCompoundAssignment' has fewer named arguments than those of overridden method 'KernelExpressionGenerator::buildCompoundAssignment'.
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:177:14: Context: This is the overridden method ('buildCompoundAssignment').
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:1513:16: Context: Override was introduced when the mixin 'ContextAwareGenerator' was applied to 'KernelGenerator'.
abstract class KernelContextAwareGenerator extends KernelGenerator
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/expression_generator.dart:894:14: Error: The method 'ContextAwareGenerator::buildCompoundAssignment' doesn't have the named parameter 'isPostIncDec' of overridden method 'KernelExpressionGenerator::buildCompoundAssignment'.
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
Failed to precompile build_runner:build_runner:
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/expression_generator.dart:740:14: Error: The method 'ErroneousExpressionGenerator::buildCompoundAssignment' has fewer named arguments than those of overridden method 'KernelExpressionGenerator::buildCompoundAssignment'.
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:177:14: Context: This is the overridden method ('buildCompoundAssignment').
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:1424:7: Context: Override was introduced when the mixin 'ErroneousExpressionGenerator' was applied to 'KernelGenerator'.
class KernelUnresolvedNameGenerator extends KernelGenerator
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/expression_generator.dart:740:14: Error: The method 'ErroneousExpressionGenerator::buildCompoundAssignment' doesn't have the named parameter 'isPostIncDec' of overridden method 'KernelExpressionGenerator::buildCompoundAssignment'.
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:177:14: Context: This is the overridden method ('buildCompoundAssignment').
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:1424:7: Context: Override was introduced when the mixin 'ErroneousExpressionGenerator' was applied to 'KernelGenerator'.
class KernelUnresolvedNameGenerator extends KernelGenerator
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/expression_generator.dart:894:14: Error: The method 'ContextAwareGenerator::buildCompoundAssignment' has fewer named arguments than those of overridden method 'KernelExpressionGenerator::buildCompoundAssignment'.
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:177:14: Context: This is the overridden method ('buildCompoundAssignment').
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/kernel_expression_generator.dart:1513:16: Context: Override was introduced when the mixin 'ContextAwareGenerator' was applied to 'KernelGenerator'.
abstract class KernelContextAwareGenerator extends KernelGenerator
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
file:///home/ferk/flutter/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.4/lib/src/fasta/kernel/expression_generator.dart:894:14: Error: The method 'ContextAwareGenerator::buildCompoundAssignment' doesn't have the named parameter 'isPostIncDec' of overridden method 'KernelExpressionGenerator::buildCompoundAssignment'.
  Expression buildCompoundAssignment(Name binaryOperator, Expression value,
             ^
pub finished with exit code 1

------------

flutter doctor -v
[✓] Flutter (Channel beta, v1.0.0, on Linux, locale en_US.UTF-8)
    • Flutter version 1.0.0 at /home/ferk/flutter
    • Framework revision 5391447fae (8 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /home/ferk/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /usr/local/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Android Studio (version 3.1)
    • Android Studio at /usr/local/android-studio
    • Flutter plugin version 28.0.2
    • Dart plugin version 181.5616
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)





Bilge Çimen

unread,
Feb 5, 2019, 4:43:04 AM2/5/19
to Flutter Dev


If you are using json_serialize just update it to
json_serializable: ^2.0.2
    if not then update the other dev dependicies to the lastest version it solves the problem.

Steven McDowall

unread,
Feb 5, 2019, 10:01:58 AM2/5/19
to Bilge Çimen, Flutter Dev
Btw - with the latest upgrade there are a lot of package upgrades that need to be done manually due to how semvar works .. 

So make sure to look at your pubspec and go and check the latest versions .. many have the 0.x number changed that is not reflected in a flutter upgrade

Just a heads up 
--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johan van der Hoeven

unread,
Feb 14, 2019, 6:10:40 PM2/14/19
to Steven McDowall, Bilge Çimen, Flutter Dev
Thanks Steven and Bilge,
sure helped me get it going.

You received this message because you are subscribed to a topic in the Google Groups "Flutter Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flutter-dev/0rQvVGRt-3E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flutter-dev...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Thanks -Johan


Reply all
Reply to author
Forward
0 new messages