Right Way to create Splash Screen on Android
Ankit Sinhal
35812

Following this process, I see this error sometime.

Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 6144012 byte allocation with 5205808 free bytes and 4MB until OOM
 at dalvik.system.VMRuntime.newNonMovableArray(VMRuntime.java)
 at android.graphics.BitmapFactory.nativeDecodeAsset(BitmapFactory.java)
 at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:856)
 at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:675)
 at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:703)
 at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:733)
 at android.graphics.drawable.BitmapDrawable.updateStateFromTypedArray(BitmapDrawable.java:779)
 at android.graphics.drawable.BitmapDrawable.inflate(BitmapDrawable.java:741)
 at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:2549)
 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:2549)
 at android.graphics.drawable.Drawable.createFromXml(Drawable.java:2320)
 at android.content.res.Resources.loadDrawableForCookie(Resources.java:4206)
 at android.content.res.Resources.loadDrawable(Resources.java:4085)
 at android.content.res.Resources.getDrawable(Resources.java:2005)
 at android.content.res.Resources.getDrawable(Resources.java:1987)
 at android.content.Context.getDrawable(Context.java:464)
 at android.support.v4.content.ContextCompatApi21.getDrawable(ContextCompatApi21.java:30)
 at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:372)
 at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:202)
 at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
 at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:131)
 at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:155)
 at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:31)
 at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:55)
 at android.support.v7.app.AppCompatDelegateImplV23.<init>(AppCompatDelegateImplV23.java:33)
 at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:203)
 at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
 at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)
 at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
 at co.bytemark.base.BaseActivity.onCreate(BaseActivity.java:21)
 at co.bytemark.splash.SplashScreenActivity.onCreate(SplashScreenActivity.java:35)
 at android.app.Activity.performCreate(Activity.java:6876)
 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
 at android.app.ActivityThread.access$1100(ActivityThread.java:221)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loop(Looper.java:158)
 at android.app.ActivityThread.main(ActivityThread.java:7224)
 at java.lang.reflect.Method.invoke(Method.java)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

how do I resolve this?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.