Search code examples
androidfluttersplash-screen

Changes made in Splash screen are not getting reflected


I was recently trying to add a splash screen to my android app that I am trying to develop. But no matter what changes I make changes are not getting reflected. I am new to flutter to I am including a lot of code. Here is the code -

values>colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="background_color">#FFCC00</color>
</resources>

drawable>>launch_background.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@color/background_color" />

    <!-- You can insert your own image assets here -->
    <!-- <item>
        <bitmap
            android:gravity="center"
            android:src="@drawable/welcome" />
    </item> -->
</layer-list>

I am using flutter channel 'master' as Android Studio 4.1.2 is not supported in channel 'stable'

Please inform me if any other code is required. Thanks in advance.


Solution

  • I tried a lot of stuff. Wasted nearly 14 hours, to realize that Android Studio 4.1.2, has some sort of problem with flutter doctor as of 12/2/2021. So I switched back to Android Studio 4.0 and re-installed the flutter SDK. This solved the problem for me. As far as, I am aware of the issue, it was due to different unsupported versions of Android Studio and Flutter. Maybe in the future, smart guys at google sort this out :)