channdara / flutter_localization

BSD 3-Clause "New" or "Revised" License
10 stars 17 forks source link

I was still using it normally until one day it reported an error like that #9

Open phamchien789vn opened 8 months ago

phamchien789vn commented 8 months ago

If I use the package, it will report an error as shown in the debug screen, and if I don't use it, it will work normally

Debug Console Launching lib\main.dart on Windows in debug mode... main.dart:1 /C:/Developer/flutter/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart(41545,41): error G020FDE51: A method declaration needs an explicit list of parameters. [D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\flutter\flutter_assemble.vcxproj] /C:/Developer/flutter/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart(41545,41): error G90CBB506: The name of a constructor must match the name of the enclosing class. [D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\flutter\flutter_assemble.vcxproj] /C:/Developer/flutter/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart(41545,40): error G67247B7E: Expected ';' after this. [D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\flutter\flutter_assemble.vcxproj] /C:/Developer/flutter/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart(41545,40): error G44692867: A value of type 'int' can't be returned from a function with return type 'ScriptCategory'. [D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\flutter\flutter_assemble.vcxproj] /C:/Developer/flutter/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart(41545,41): error G6814800A: Expected a class member, but got 'ScriptCategory'. [D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\flutter\flutter_assemble.vcxproj] /C:/Developer/flutter/packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart(41545,41): error GB23DA612: The superclass, 'GlobalMaterialLocalizations', has no unnamed constructor that takes no arguments. [D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\flutter\flutter_assemble.vcxproj]

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(249,5): error MSB8066: Custom build for 'D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\CMakeFiles\601b17c202b30b5f36d32fa72406aba7\flutter_windows.dll.rule;D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\CMakeFiles\5b79815e23bc1c7fe6ea2d6e6308cfa7\flutter_assemble.rule' exited with code 1. [D:\Workspace\Coding\DevUP_LMS\devuplms-flutter\build\windows\flutter\flutter_assemble.vcxproj] Exception: Build process failed. Exited (sigterm)

channdara commented 8 months ago

Hello. I can see the issue came from Flutter SDK flutter_localizations (a bit confused with my package where it does not have "s" at the end). Have you tried to update Flutter to see if the issue is solved? Or have you faced the issue after updating Flutter?