0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Flutter Android Build 画面が崩れる? 黒くなる?

Posted at

Android Build 画面が崩れる?

以前あったのですが、突然UIが崩れる謎の現象に当たることがありました。

動作環境

  • Flutter.3.27.0
  • fvmでバージョン管理
  • AndroidStudio2024.3 Meerkat

一回目にビルドすると画面が黒くなる
このような画面になる?

after.png

レンダリングエンジンの影響かなと思ったがどうやらそうでもないらしい?

このコマンドで解決できたが違う気がする?

flutter run --no-enable-impeller

Android エミュレーターのAPIレベルは36これが原因だったようだ。。。

APIレベルを34に下げると解決した!

beforejp.jpg

まとめ

仕事や個人開発で動いているFlutterアプリが最新バージョンとは限らないので、プロジェクトに合わせて、Android Studioを古くしたり、APIレベルを下げる必要があります。

もし画面が黒くなったり、崩れる現象が起きたら使用しているAndroidエミュレーターのAPIレベルを下げてみてください!

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?