Skip to content

flutter_news_template various issues during flutter run #170982

@konstantin-mohin

Description

@konstantin-mohin

#hey
I successfully generated a project using mason , I did according to https://flutter.github.io/news_toolkit/ including Firebase setup (but NOT ads, notifications and others).

  • The First issue "Error (Xcode): Error: Couldn't resolve the package 'flutter_gen'"
    in
    package:flutter_gen/gen_l10n/app_localizations.dart'.

I found a way how to bypass it just wanted to run the project, I changed imports in I10n.dart

import 'generated/app_localizations.dart';
import 'package:flutter/widgets.dart';
export 'generated/app_localizations.dart';

extension AppLocalizationsX on BuildContext {
  AppLocalizations get l10n => AppLocalizations.of(this);
}

and modify the I10n.yaml

template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
nullable-getter: false
synthetic-package: false
output-dir: lib/l10n/generated
  • the second

on IOS Lexical or Preprocessor Issue (Xcode): 'FirebaseAuth/FirebaseAuth-Swift.h' file not found , as well as FirebaseMessaging h ...

on Android

/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterAssetManager.java:61: error: cannot find symbol
    final PluginRegistry.Registrar registrar;
                        ^
  symbol:   class Registrar
  location: interface PluginRegistry
/Users/kosmos/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterAssetManager.java:71: error: cannot find symbol
    RegistrarFlutterAssetManager(AssetManager assetManager, PluginRegistry.Registrar registrar) {
                                                                          ^
  symbol:   class Registrar
  location: interface PluginRegistry
/Users/kosmos/.pub-cache/hosted/pub.dev/webview_flutter_android-3.16.0/android/src/main/java/io/flutter/plugins/webviewflutter/WebViewFlutterPlugin.java:70: error: cannot find symbol
      @NonNull io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
                                                      ^
  symbol:   class Registrar
  location: interface PluginRegistry
  • third issue in the app_theme.dart:32 The argument type 'TabBarTheme' can't be assigned to the parameter type 'TabBarThemeData?'.

flutter doctor:

Flutter (Channel stable, 3.32.2, on macOS 15.5 24F74 darwin-arm64, locale
    en-IL) [298ms]
    • Flutter version 3.32.2 on channel stable at
      /opt/homebrew/Caskroom/flutter/3.29.0/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 8defaa71a7 (3 weeks ago), 2025-06-04 11:02:51 -0700
    • Engine revision 1091508939
    • Dart version 3.8.1
    • DevTools version 2.45.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [3.8s]
    • Android SDK at /Users/kosmos/Library/Android/sdk
    • Platform android-35, build-tools 34.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on
      this machine.
      To manually set the JDK path, use: `flutter config
      --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build
      17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.4) [632ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16F6
    • CocoaPods version 1.16.2

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

[✓] Android Studio (version 2022.3) [7ms]
    • 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
      17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.101.1) [5ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.112.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions