【发布时间】:2021-03-07 10:57:42
【问题描述】:
我创建了一个在实体手机上运行良好的颤振应用程序,但是当我在模拟器上尝试时,应用程序不幸停止了。产生错误java.lang.RuntimeException: Unable to start activity ComponentInfo{big.xxxx.xxxxx/xxx.xxxxx.xxxxx.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable/launch_background.xml from drawable resource ID #0x7f040019
我已经检查过了,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:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
【问题讨论】:
-
确保你的android项目中存在
launch_background.xml -
我已经检查过并且 launch_background.xml 存在。我已经用 xml 文件的内容编辑了我的问题
标签: android flutter flutter-layout flutter-dependencies flutter-web