skip to Main Content

I was recently debugging my Flutter app on Android 14 with Flutter 3.27, 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.

2

Answers


  1. Chosen as BEST ANSWER

    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 your AndroidManifest.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.


  2. As Flutter team mentioned in their doc, if you enable impeller, it shouldn’t work well on some old devices which not supporting Vulkan. And from 3.27 of Flutter version, impeller is enabled by default.

    You should disable the impeller with flutter run --no-enable-impeller. When you run the app from VSCode with the green Debug button, you should add that option in the VSCode launch settings file of the project.

    You can find launch.json file in .vscode folder of the project which is generated automatically by VSCode.

    There you can add --no-enable-impeller in the args of one configuration.

    {
       "name": "android-debug",
       "request": "launch",
       "type": "dart",
       "args": [
          "--no-enable-impeller",
       ],
       "flutterMode": "debug"
    },
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search