localizely / intl_utils

Dart package that creates a binding between your translations from .arb files and your Flutter app
BSD 3-Clause "New" or "Revised" License
135 stars 81 forks source link

Failed to build intl_utils:generate #116

Closed bahadirarslan closed 1 year ago

bahadirarslan commented 1 year ago

My "Extract To ARB" function broke after upgrading Flutter 3.13

When I try to use Extract To ARB function or save .arb file I see this output.

INFO: Generating localization files for the 'mylog' project...
Failed to build intl_utils:generate:
../../../.pub-cache/hosted/pub.dev/watcher-1.0.2/lib/src/constructable_file_system_event.dart:7:57: Error: The class 'FileSystemEvent' can't be extended, implemented, or mixed in outside of its library because it's a sealed class.
abstract class _ConstructableFileSystemEvent implements FileSystemEvent {
                                                        ^
exit code 1

Here is my flutter doctor -v output

[✓] Flutter (Channel stable, 3.13.1, on macOS 13.4.1 22F770820d darwin-arm64, locale en-TR)
    • Flutter version 3.13.1 on channel stable at /Users/bahadirarslan/Development/SDKS/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e1e47221e8 (2 days ago), 2023-08-22 21:43:18 -0700
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/bahadirarslan/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.81.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • My Phone (mobile) • C0BBC646-928A-4E6B-8562-96C26481847A • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)   • macos                                • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
    • Chrome (web)      • chrome                               • web-javascript • Google Chrome 116.0.5845.110

[✓] Network resources
    • All expected network resources are available.

• No issues found!

pubspec.yaml environment

environment:
  sdk: ">=3.0.0 <3.13.1"

Do you have any suggestions?

lzoran commented 1 year ago

Hi @bahadirarslan,

There seems to be a cache-related issue with Flutter after upgrade.

Could you please let me know which version of the intl_utils package you're using?

flutter pub global list

A potential fix is to reactivate the intl_utils package. It might help resolve the issue.

flutter pub global deactivate intl_utils
flutter pub global activate intl_utils
bahadirarslan commented 1 year ago

Yes! I was looking for this. Thank you, I couldn't find the renew caches. Now it works

szuwest commented 1 year ago

Hi @bahadirarslan,

There seems to be a cache-related issue with Flutter after upgrade.

Could you please let me know which version of the intl_utils package you're using?

flutter pub global list

A potential fix is to reactivate the intl_utils package. It might help resolve the issue.

flutter pub global deactivate intl_utils
flutter pub global activate intl_utils

That's it!

herisarwanto99 commented 9 months ago

Hi @bahadirarslan,

There seems to be a cache-related issue with Flutter after upgrade.

Could you please let me know which version of the intl_utils package you're using?

flutter pub global list

A potential fix is to reactivate the intl_utils package. It might help resolve the issue.

flutter pub global deactivate intl_utils
flutter pub global activate intl_utils

This worked for me 💯