Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Type 'ui.TextHeightBehavior' not found in flutter

I got a problem when I flutter build appbundle in terminal command

Compiler message:

    ../../flutter/packages/flutter/lib/src/widgets/basic.dart:5149:9: Error: Type 'ui.TextHeightBehavior' not found.
      final ui.TextHeightBehavior textHeightBehavior;                       
            ^^^^^^^^^^^^^^^^^^^^^                                           
    ../../flutter/packages/flutter/lib/src/widgets/text.dart:149:9: Error: Type 'ui.TextHeightBehavior' not found.
      final ui.TextHeightBehavior textHeightBehavior;                       
            ^^^^^^^^^^^^^^^^^^^^^                                           
    ../../flutter/packages/flutter/lib/src/widgets/text.dart:432:9: Error: Type 'ui.TextHeightBehavior' not found.
      final ui.TextHeightBehavior textHeightBehavior;                       
            ^^^^^^^^^^^^^^^^^^^^^                                           
    ../../flutter/packages/flutter/lib/src/rendering/paragraph.dart:78:5: Error: Type 'ui.TextHeightBehavior' not found.
        ui.TextHeightBehavior textHeightBehavior,                           
        ^^^^^^^^^^^^^^^^^^^^^                                               
    ../../flutter/packages/flutter/lib/src/rendering/paragraph.dart:281:3: Error: Type 'ui.TextHeightBehavior' not found.
      ui.TextHeightBehavior get textHeightBehavior => _textPainter.textHeightBehavior;
      ^^^^^^^^^^^^^^^^^^^^^                                                 
    ../../flutter/packages/flutter/lib/src/rendering/paragraph.dart:282:26: Error: Type 'ui.TextHeightBehavior' not found.
      set textHeightBehavior(ui.TextHeightBehavior value) {                 
                             ^^^^^^^^^^^^^^^^^^^^^                          
    ../../flutter/packages/flutter/lib/src/painting/text_painter.dart:145:5: Error: Type 'ui.TextHeightBehavior' not found.
        ui.TextHeightBehavior textHeightBehavior,                           
        ^^^^^^^^^^^^^^^^^^^^^                                               
    ../../flutter/packages/flutter/lib/src/painting/text_painter.dart:346:3: Error: Type 'ui.TextHeightBehavior' not found.
      ui.TextHeightBehavior get textHeightBehavior => _textHeightBehavior;  
      ^^^^^^^^^^^^^^^^^^^^^                                                 
    ../../flutter/packages/flutter/lib/src/painting/text_painter.dart:347:3: Error: Type 'ui.TextHeightBehavior' not found.
      ui.TextHeightBehavior _textHeightBehavior;                            
      ^^^^^^^^^^^^^^^^^^^^^                                                 
    ../../flutter/packages/flutter/lib/src/painting/text_painter.dart:348:26: Error: Type 'ui.TextHeightBehavior' not found.
      set textHeightBehavior(ui.TextHeightBehavior value) {                 
                             ^^^^^^^^^^^^^^^^^^^^^                          
    ../../flutter/packages/flutter/lib/src/painting/text_style.dart:1070:5: Error: Type 'ui.TextHeightBehavior' not found.
        ui.TextHeightBehavior textHeightBehavior,                           
        ^^^^^^^^^^^^^^^^^^^^^                                               
    ../../flutter/packages/flutter/lib/src/widgets/basic.dart:5149:12: Error: 'TextHeightBehavior' isn't a type.
      final ui.TextHeightBehavior textHeightBehavior;                       
               ^^^^^^^^^^^^^^^^^^                                           
    ../../flutter/packages/flutter/lib/src/widgets/text.dart:149:12: Error: 'TextHeightBehavior' isn't a type.
      final ui.TextHeightBehavior textHeightBehavior;                       
               ^^^^^^^^^^^^^^^^^^                                           
    ../../flutter/packages/flutter/lib/src/widgets/text.dart:200:43: Error: 'TextHeightBehavior' isn't a type.
        properties.add(DiagnosticsProperty<ui.TextHeightBehavior>('textHeightBehavior', textHeightBehavior, defaultValue: null));
                                              ^^^^^^^^^^^^^^^^^^            
    ../../flutter/packages/flutter/lib/src/widgets/text.dart:432:12: Error: 'TextHeightBehavior' isn't a type.
      final ui.TextHeightBehavior textHeightBehavior;                       
               ^^^^^^^^^^^^^^^^^^                                           
    ../../flutter/packages/flutter/lib/src/widgets/text.dart:487:43: Error: 'TextHeightBehavior' isn't a type.
        properties.add(DiagnosticsProperty<ui.TextHeightBehavior>('textHeightBehavior', textHeightBehavior, defaultValue: null));
                                              ^^^^^^^^^^^^^^^^^^            
    ../../flutter/packages/flutter/lib/src/rendering/paragraph.dart:78:8: Error: 'TextHeightBehavior' isn't a type.
        ui.TextHeightBehavior textHeightBehavior,                           
           ^^^^^^^^^^^^^^^^^^                                               
    ../../flutter/packages/flutter/lib/src/rendering/paragraph.dart:282:29: Error: 'TextHeightBehavior' isn't a type.
      set textHeightBehavior(ui.TextHeightBehavior value) {                 
                                ^^^^^^^^^^^^^^^^^^                          
    ../../flutter/packages/flutter/lib/src/painting/text_painter.dart:145:8: Error: 'TextHeightBehavior' isn't a type.
        ui.TextHeightBehavior textHeightBehavior,                           
           ^^^^^^^^^^^^^^^^^^                                               
    ../../flutter/packages/flutter/lib/src/painting/text_painter.dart:347:6: Error: 'TextHeightBehavior' isn't a type.
      ui.TextHeightBehavior _textHeightBehavior;                            
         ^^^^^^^^^^^^^^^^^^                                                 
    ../../flutter/packages/flutter/lib/src/painting/text_painter.dart:348:29: Error: 'TextHeightBehavior' isn't a type.
      set textHeightBehavior(ui.TextHeightBehavior value) {                 
                                ^^^^^^^^^^^^^^^^^^                          
    ../../flutter/packages/flutter/lib/src/painting/text_painter.dart:422:7: Error: No named parameter with the name 'textHeightBehavior'.
          textHeightBehavior: _textHeightBehavior,                          
          ^^^^^^^^^^^^^^^^^^                                                
    org-dartlang-sdk:///flutter/lib/ui/text.dart:865:3: Context: Found this candidate, but the arguments don't match.
      ParagraphStyle({                                                      
      ^^^^^^^^^^^^^^                                                        
    ../../flutter/packages/flutter/lib/src/painting/text_style.dart:1070:8: Error: 'TextHeightBehavior' isn't a type.
        ui.TextHeightBehavior textHeightBehavior,                           
           ^^^^^^^^^^^^^^^^^^                                               
    ../../flutter/packages/flutter/lib/src/painting/text_style.dart:1091:7: Error: No named parameter with the name 'textHeightBehavior'.
          textHeightBehavior: textHeightBehavior,   

                        
      ^^^^^^^^^^^^^^^^^^                                                
org-dartlang-sdk:///flutter/lib/ui/text.dart:865:3: Context: Found this candidate, but the arguments don't match.
  ParagraphStyle({                                                      
  ^^^^^^^^^^^^^^                                                        
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.                                                           
                                                                        
FAILURE: Build failed with an exception.    

                        
                                                                    
  • Where: Script '/Users/mac/Downloads/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 801
* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildRelease'.            
> Process 'command '/Users/mac/Downloads/flutter/bin/flutter'' finished with non-zero exit value 1

**this is my flutter doctor: **

[✓] Flutter (Channel master, v1.14.7-pre.83, on Mac OS X 10.15.2 19C57, locale en-ID) • Flutter version 1.14.7-pre.83 at /Users/mac/flutter • Framework revision e10df3c1a6 (2 days ago), 2020-02-01 11:23:01 +0800 • Engine revision e625e174c5 • Dart version 2.8.0 (build 2.8.0-dev.6.0 5ae5aff640)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/mac/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.3.1, Build version 11C504 • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 43.0.1 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Community Edition (version 2018.2.2) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 29.1.3 • Dart plugin version 182.4129.13

Previously I success upload my app to Google Playstore. But when I want to update my app, I face this problem. thank you before

like image 270
Fadhil Kemal Avatar asked Dec 31 '22 07:12

Fadhil Kemal


1 Answers

change your flutter master at terminal of your project write flutter channel stable

like image 164
Mohammed Alanany Avatar answered Jan 21 '23 06:01

Mohammed Alanany