Search code examples
androiddarticonsflutter

resource style/LaunchTheme not found


I just changed the icon for my app to a newer one and now whenever i try to build and run the app i get the following error:

 Project\build\app\intermediates\manifests\full\debug\AndroidManifest.xml:49: AAPT: 
 error: resource style/LaunchTheme (aka 
 com.example.project:style/LaunchTheme) not found.

I used the flutter_launcher_icon package to make the icons and I have tried the solutions provided online but none of them seemed to help

Android file directory


Solution

  • Ok, looks like you don't have your styles.xml file which has the theme.

    Create a file named styles.xml inside the folder res/values and add this content:

        <?xml version="1.0" encoding="utf-8"?>
        <resources>
            <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
                <!-- Show a splash screen on the activity. Automatically removed when
                     Flutter draws its first frame -->
                <item name="android:windowBackground">@drawable/launch_background</item>
                <item name="android:windowFullscreen">true</item> 
            </style>
        </resources>