找不到资源样式/启动主题

问题描述 投票:0回答:3

我刚刚将我的应用程序的图标更改为较新的图标,现在每当我尝试构建并运行该应用程序时,我都会收到以下错误:

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

我使用 flutter_launcher_icon 包来制作图标,我已经尝试过网上提供的解决方案,但似乎没有一个有帮助

android dart icons flutter
3个回答
18
投票

好的,看起来您没有包含该主题的

styles.xml
文件。

在文件夹

styles.xml
内创建一个名为
res/values
的文件并添加以下内容:

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

7
投票

我像这样解决了我的 androidmanifest-> 调用 NormalTheme 但我的 styles.xml 文件夹有 LaunchTheme 所以我更改名称问题已经解决了:)


0
投票
短边 @color/staticSplashScreenBackgroundColor @color/staticSplashScreenBackgroundColor @color/staticSplashScreenBackgroundColor 0
© www.soinside.com 2019 - 2024. All rights reserved.