Bad state: Unexpected diagnostics: after flutter upgrade to 1.20.1

前端 未结 3 1849
灰色年华
灰色年华 2020-12-21 12:49

What is the issue?

xxx@xxx-Inspiron-14-3467:~/xxx$ flutter pub run build_runner build[INFO] Generating build script...
[INFO] Generating build script complete         


        
相关标签:
3条回答
  • 2020-12-21 12:57

    After spending more that 3 hours, finally I managed to solved.

    For those who have upgraded to flutter version 1.20.1 or above, make sure you add this line in pubspec.yaml.

    dependency_overrides:
      analyzer: '0.39.14'
    
    0 讨论(0)
  • 2020-12-21 13:04

    try it:

    1- flutter clean

    2- go on dev channel: flutter channel dev

    3- upgrade: flutter upgrade --force

    4- flutter pub get

    5- try to build

    6- back on stable or master channel: flutter channel stable (flutter channel master)

    7- upgrade: flutter upgrade --force

    0 讨论(0)
  • 2020-12-21 13:13

    I had the same issue:

    Please try this in your pubspec file

    dependency_overrides:
      analyzer: '0.39.17'    
      build_resolvers: '1.3.10'
    
    0 讨论(0)
提交回复
热议问题