title: the app crash when I tried to apply splash screen using a Launcher Theme
body: <p>I'm trying to apply a splash screen to my app, like this  <a href="https://medium.com/@shishirthedev/the-right-way-to-implement-a-splash-screen-in-android-acae0e52949a" rel="nofollow noreferrer">article</a>says, there is two way and I picked the launched theme. after I followed all the step the crashed!
  here is the resource drawable:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;layer-list xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
  
      &lt;item android:drawable=&quot;@android:color/holo_blue_dark&quot;/&gt;
  
      &lt;item&gt;
          &lt;bitmap
              android:gravity=&quot;center&quot;
              app:srcCompat=&quot;@drawable/ic_avatar_1&quot; /&gt;
      &lt;/item&gt;
  &lt;/layer-list&gt;
  </code></pre>
  <p>here is the style I used</p>
  <pre><code>    &lt;style name=&quot;SplashScreenTheme&quot; parent = &quot;Theme.AppCompat.NoActionBar&quot;&gt;
      &lt;item
          name=&quot;android:windowBackground&quot;&gt;@drawable/splash_screen_background
      &lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  <p>the android manifest file:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      package=&quot;com.example.remindme&quot;&gt;
  
      &lt;application
          android:allowBackup=&quot;true&quot;
          android:icon=&quot;@mipmap/ic_launcher&quot;
          android:label=&quot;@string/app_name&quot;
          android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
          android:supportsRtl=&quot;true&quot;
          android:theme=&quot;@style/AppTheme&quot;&gt;
          &lt;activity android:name=&quot;.SplashScreenActivity&quot;
              android:theme=&quot;@style/SplashScreenTheme&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
  
                  &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name=&quot;.MainActivity&quot; /&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  <p>and finally this the splash screen activity:</p>
  <pre><code> override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
  
          startActivity(Intent(this@SplashScreenActivity, MainActivity::class.java))
          finish()
      }
  </code></pre>
  <p>and here is the logcat error:</p>
  <pre><code>  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.remindme/com.example.remindme.SplashScreenActivity}: android.content.res.Resources$NotFoundException: File res/drawable/splash_screen_background.xml from drawable resource ID #0x7f070097
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
          at android.app.ActivityThread.-wrap11(ActivityThread.java)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:148)
          at android.app.ActivityThread.main(ActivityThread.java:5417)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
       Caused by: android.content.res.Resources$NotFoundException: File res/drawable/splash_screen_background.xml from drawable resource ID #0x7f070097
          at android.content.res.Resources.loadDrawableForCookie(Resources.java:2640)
          at android.content.res.Resources.loadDrawable(Resources.java:2540)
          at android.content.res.Resources.getDrawable(Resources.java:806)
          at android.content.Context.getDrawable(Context.java:458)
          at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:455)
          at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:144)
          at androidx.appcompat.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:411)
          at androidx.appcompat.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:86)
          at androidx.appcompat.app.AppCompatDelegateImpl.attachToWindow(AppCompatDelegateImpl.java:647)
          at androidx.appcompat.app.AppCompatDelegateImpl.ensureWindow(AppCompatDelegateImpl.java:623)
          at androidx.appcompat.app.AppCompatDelegateImpl.onCreate(AppCompatDelegateImpl.java:350)
          at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:105)
          at com.example.remindme.SplashScreenActivity.onCreate(SplashScreenActivity.kt:10)
          at android.app.Activity.performCreate(Activity.java:6237)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
          at android.app.ActivityThread.-wrap11(ActivityThread.java) 
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
          at android.os.Handler.dispatchMessage(Handler.java:102) 
          at android.os.Looper.loop(Looper.java:148) 
          at android.app.ActivityThread.main(ActivityThread.java:5417) 
          at java.lang.reflect.Method.invoke(Native Method) 
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
       Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #8: &lt;bitmap&gt; requires a valid 'src' attribute
          at android.graphics.drawable.BitmapDrawable.verifyRequiredAttributes(BitmapDrawable.java:742)
          at android.graphics.drawable.BitmapDrawable.inflate(BitmapDrawable.java:725)
          at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1215)
          at android.graphics.drawable.LayerDrawable.inflateLayers(LayerDrawable.java:254)
          at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:164)
          at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1215)
          at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1124)
          at android.content.res.Resources.loadDrawableForCookie(Resources.java:2630)
          at android.content.res.Resources.loadDrawable(Resources.java:2540) 
          at android.content.res.Resources.getDrawable(Resources.java:806) 
          at android.content.Context.getDrawable(Context.java:458) 
          at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:455) 
          at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:144) 
          at androidx.appcompat.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:411) 
          at androidx.appcompat.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:86) 
          at androidx.appcompat.app.AppCompatDelegateImpl.attachToWindow(AppCompatDelegateImpl.java:647) 
          at androidx.appcompat.app.AppCompatDelegateImpl.ensureWindow(AppCompatDelegateImpl.java:623) 
          at androidx.appcompat.app.AppCompatDelegateImpl.onCreate(AppCompatDelegateImpl.java:350) 
          at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:105) 
          at com.example.remindme.SplashScreenActivity.onCreate(SplashScreenActivity.kt:10) 
          at android.app.Activity.performCreate(Activity.java:6237) 
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
          at android.app.ActivityThread.-wrap11(ActivityThread.java) 
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
          at android.os.Handler.dispatchMessage(Handler.java:102) 
          at android.os.Looper.loop(Looper.java:148) 
          at android.app.ActivityThread.main(ActivityThread.java:5417) 
          at java.lang.reflect.Method.invoke(Native Method) 
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
  </code></pre>