Flutter - Error: The language version override has to be the same in the library and its part(s)

659

slide_countdown_clock, this package does not support Null Safety and Flutter 2.0.1 is a version with null safety.

So, you can't use it on Flutter version 2.0.1. Try to use another pub package that supports Null Safety.

You should not upgrade to Flutter version 2.0.1 until your existing project's dependencies are not supporting Null Safety.

Share:
659
Ergün Yunus Cengiz
Author by

Ergün Yunus Cengiz

Updated on December 28, 2022

Comments

  • Ergün Yunus Cengiz
    Ergün Yunus Cengiz over 1 year

    I was update my Flutter SDK version from dev channel (1.14.5) to stable channel (2.0.1). My codes was works perfectly but now i get this error. I think the problem is at slide_countdown_clock but im not sure.

        lib/Screens/sets4_widget/Countdown.dart:7:6: Error: The language version override has to be the same in the library and its part(s).
    part 'package:slide_countdown_clock/clip_digit.dart';
         ^
    lib/Screens/sets4_widget/Countdown.dart:8:6: Error: The language version override has to be the same in the library and its part(s).
    part 'package:slide_countdown_clock/digit.dart';
         ^
    lib/Screens/sets4_widget/Countdown.dart:9:6: Error: The language version override has to be the same in the library and its part(s).
    part 'package:slide_countdown_clock/slide_direction.dart';
         ^
    
    
    FAILURE: Build failed with an exception.
    
    * Where:
    Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991
    
    * What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.
    > Process 'command 'C:\flutter\bin\flutter.bat'' 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 13s
    Exception: Gradle task assembleDebug failed with exit code 1
         ^
    

    I also share the lines of code that the error pointed to me below.

    part 'package:slide_countdown_clock/clip_digit.dart';
    part 'package:slide_countdown_clock/digit.dart';
    part 'package:slide_countdown_clock/slide_direction.dart';
    

    those parts are give me error. I tried flutter clean > flutter upgrade > flutter pub upgrade but still no result. Can anyone please help?

  • Ergün Yunus Cengiz
    Ergün Yunus Cengiz about 3 years
    Thank you that solved my problem but now i get different error.
  • Ergün Yunus Cengiz
    Ergün Yunus Cengiz about 3 years
    cannot find symbol com.github.yasukotelin.ext_storage.ExtStoragePlugin.register‌​With(shimPluginRegis‌​try.registrarFor("co‌​m.github.yasukotelin‌​.ext_storage.ExtStor‌​agePlugin")); error message is this. Do you know anything about ext_storage package?
  • Santo Shakil
    Santo Shakil about 3 years
    You most wellcome.
  • Santo Shakil
    Santo Shakil about 3 years
    Take a look at this thread. This might help. github.com/FirebaseExtended/flutterfire/issues/1591
  • Ergün Yunus Cengiz
    Ergün Yunus Cengiz about 3 years
    Hi Santo, i need to use slide_countdown_clock package but in the same time i need to use new version as i can use how can i do that? How can i use newer version as i can? Is slide_countdown_clock works on 1.22.6 flutter ?
  • Santo Shakil
    Santo Shakil about 3 years
    Unfortunately, currently, there is no new version available for slide_countdown_clock
  • Ergün Yunus Cengiz
    Ergün Yunus Cengiz about 3 years
    slide_countdown_clock package is works only in 1.14.5 dev channel?
  • Ergün Yunus Cengiz
    Ergün Yunus Cengiz about 3 years
    Is there any other package that works like the slide_countdown_clock package?