I was recently debugging my Flutter app on Android 14 with Flutter 3.27.2, and there was no other special configuration for its UI rendering or anything related to UI or UX. However, when I tried to debug my Flutter app on Android 13, it went black screen after the splash screen finishes to show.
After doing research, I found this thread.
It suggests running this command: flutter run --no-enable-impeller
Unfortunately, if I deploy my app locally by pressing the green arrow to run on my physical device (developing the Flutter app with VS Code), the issue persists.
With thorough research, I found this official README.md
file coming from official Flutter documentation: Impeller rendering engine.
Thus, I will quote some of its important notes:
Caution
The ability to disable Impeller is going to go away in a future release. Please file an issue if you need to do this in your application. A warning will be displayed on application launch if you opt-out.
I suggest that developers should watch the development with the Impeller engine if they encounter an issue while using it.
I temporarily came up with this solution to resolve the issue from my provided question:
Android
Impeller will use Vulkan on Android by default. To explicitly opt out of using Impeller, add the following to yourAndroidManifest.xml
under the<application>
tag.<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />
Where Vulkan is unavailable, Impeller will fallback to Skia.
Then the issue on my Android 13 using Flutter 3.27.2 with a black screen after the splash screen resolved!
It works fine in my case of developing the Flutter app through the use of VS Code.
P.S., The term "temporary" solution is a reminder to inform you that it's not recommended for future releases of Flutter.
According to this documentation: Impeller rendering engine:
Android
To disable Impeller when deploying your app, add the following setting to your project's AndroidManifest.xml file under the
<application>
tag:<meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />
But then again, you should take note that this is not a recommended configuration, as it might be removed in Flutter's future release.
I believe that Flutter Impeller is a powerful rendering engine that must stabilize its compatibility over a wide range of devices.
From What’s new in Flutter 3.29 official blog post, I will quote:
- A large number of black screen and crash reports were the result of using Vulkan on MediaTek/PowerVR soc’s and have been disabled. These devices now only use Impeller OpenGLES (see below).
Impeller OpenGLES
In 3.29, Android devices that don’t have a functional Vulkan driver will fall back to Impeller running on OpenGLES instead of using Skia. This behavior is enabled by default and doesn’t need to be configured. This brings Impeller support on Android to 100% of Flutter’s supported Android devices.
I hope it helps future readers!