android.content.res.Resources$NotFoundException: Drawable compat_splash_screen_no_icon_background with resource ID #0x7f0801b6

Viewed 139

I am getting this issue only for samsung galaxy devices- Galaxy Tab A, Galaxy A03 Core, Galaxy A02, Galaxy A32

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.application/com.myapp.application.ui.MainActivity}: android.content.res.Resources$NotFoundException: Drawable com.app.application:drawable/compat_splash_screen_no_icon_background with resource ID #0x7f0801b6

My configuration->

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
    <style name="Theme.App.Starting" parent="Theme.SplashScreen">
        <item name="windowSplashScreenBackground">@color/white</item>

        <item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>

        <item name="postSplashScreenTheme">@style/Theme.Triva.NoActionBar</item>
        <item name="windowSplashScreenIconBackgroundColor">@color/blue</item>
        <item name="windowSplashScreenAnimationDuration">800</item>

        <item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
    </style>
</resources>

This is the resource in read only file ->

enter image description here

enter image description here

3 Answers

This is currently an issue. You will have to wait a bit for the fix to ship, then update the core-splashscreen dependency to the latest version.

It is tracked here https://issuetracker.google.com/issues/229645249 See if the call order they suggest there helps you mitigate the problem.

Try to rename the resource file. Looks like it interferes with some of Samsung's resource files and you have such runtime error.

Related