LoginSignup
2
4

Flutter 3.19.5 にアップグレードした際に出力したエラーに対応したことまとめ

Posted at

1.android/build.gradleなどの修正
下記サイトに記載されている内容を対応
https://flutter.salon/error_warning/flutter-3-19-with-android/

2.Android Studio の更新
Android Studio を最新版に更新

3.ライブラリのバージョンをすべて更新
pubspec.yaml に記載しているライブラリのバージョンをすべて更新

3.Kotlin を最新版に更新
このサイトで最新版を確認し、build.gradle に記載されているなどにて値を更新する
https://kotlinlang.org/docs/releases.html#release-details

4.Firebase.initializeAppの記載を修正
iOS だと問題なくアプリは開けたが、Android でアプリを開くと真っ黒の画面になった。
確認をすると、下記 main()に記載をしている「options: DefaultFirebaseOptions.currentPlatform」が記載していなかったため、Andorid ではアプリが開かなかったぽい。

  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform, //追加
  );

下記公式サイトを参考に firebase CLI などのインストールを実施し firebase_options.dart を作成して対応し、再度ビルドをしたところ Android でも問題なく動作した
https://firebase.google.com/docs/flutter/setup?hl=ja&platform=ios

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4