我正在使用启动画面API,一切工作正常,但在Android 5.0和5.1上无法显示图标。
启动画面API版本
implementation 'androidx.core:core-splashscreen:1.0.0'
Theme.xml
<style name="Theme.Splash" parent="Theme.SplashScreen.IconBackground">
<item name="postSplashScreenTheme">@style/Theme.MyTheme</item>
</style>
MainActivity.kt
val splashScreen = installSplashScreen()
Manifest.xml
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:name=".CarApplication"
android:theme="@style/Theme.Splash"
tools:targetApi="31">
<activity
android:theme="@style/Theme.Splash"
android:name=".presentation.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
Android 11 版本
Android 5.0 版本
现在我需要在安卓 5.0 设备上显示该图标。 我已经按照文档中的说明做了一切,但它在安卓 5.0 上似乎无法正常工作。