dart 无法解析符号“@drawable/launch_image”

hmae6n7t  于 11个月前  发布在  其他
关注(0)|答案(1)|浏览(85)

我试图在我的flutter应用程序中为我的闪屏放入am图像,但我得到了错误Cannot resolve symbol '@mipmap/launcher_icon'。我的代码到底有什么问题。这是我的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="@android:color/white" />

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

字符集


的数据

e5nqia27

e5nqia271#

简单地说,我不能这样做。你必须在pubspec.yaml的资产中添加列表。
如果你在android Studio中使用flutter.这是不可能的.
它没有Android Studio的Structure文件。
最后尝试正确创建一个flutter项目。它是一个Android Studio项目。

相关问题