【发布时间】:2021-08-02 02:32:02
【问题描述】:
我有一个flutter应用程序,我在项目的android文件夹下使用android studio附带的图像资产工具生成了应用程序图标。但是在某些版本的 android 上,这个图标或颤振的默认图标都没有显示,这似乎告诉我这不仅仅是我提供的图标的问题,而是得到了默认的绿色 android:
上面的截图来自一个 android 5 模拟器(虽然现在它已经很老了,但它仍然在技术上受到颤振的支持,所以我想测试一下),我在运行 android 7 的物理设备上遇到了同样的问题,但图标似乎在上面的任何版本上都很好。我注意到的另一件事是,多任务菜单中没有出现应用名称,但我不确定这是否是一个完全不相关的问题。
如果有人可以帮助我,那就太好了,因为我无法弄清楚我需要在项目中放置哪些其他图标,因为我认为我已经涵盖了所有选项。谢谢。
编辑 - 这是我的应用程序的 android 清单:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.letalis.testapp">
<application
android:label="Test App"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
资源文件夹:
【问题讨论】:
-
你能出示你的清单吗?
-
当然,我已经编辑了主要问题以包含它。
标签: android flutter android-gradle-plugin android-resources