title: Android App Crashes after splashscreen - Android Studio
body: <p>at the moment I am starting to build an android app and when I run it, after the splash screen it crashes.</p>
  
  <p>Here is my error:</p>
  
  <blockquote>
    <p>11-07 20:11:55.344    1273-1273/com.patrickmelia.bcrfm E/AndroidRuntime﹕ FATAL EXCEPTION: main
        Process: com.patrickmelia.bcrfm, PID: 1273
        java.lang.OutOfMemoryError: Failed to allocate a 603288012 byte allocation with 1569794 free bytes and 61MB until OOM
                at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
                at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
                at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:609)
                at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
                at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:973)
                at android.content.res.Resources.loadDrawableForCookie(Resources.java:2423)
                at android.content.res.Resources.loadDrawable(Resources.java:2330)
                at android.content.res.Resources.getDrawable(Resources.java:758)
                at android.content.res.Resources.getDrawable(Resources.java:724)
                at com.patrickmelia.bcrfm.CustomDrawerAdapter.getView(CustomDrawerAdapter.java:56)
                at android.widget.AbsListView.obtainView(AbsListView.java:2344)
                at android.widget.ListView.makeAndAddView(ListView.java:1864)
                at android.widget.ListView.fillDown(ListView.java:698)
                at android.widget.ListView.fillFromTop(ListView.java:759)
                at android.widget.ListView.layoutChildren(ListView.java:1673)
                at android.widget.AbsListView.onLayout(AbsListView.java:2148)
                at android.view.View.layout(View.java:15596)
                at android.view.ViewGroup.layout(ViewGroup.java:4966)
                at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:911)
                at android.view.View.layout(View.java:15596)
                at android.view.ViewGroup.layout(ViewGroup.java:4966)
                at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
                at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
                at android.view.View.layout(View.java:15596)
                at android.view.ViewGroup.layout(ViewGroup.java:4966)
                at com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:494)
                at android.view.View.layout(View.java:15596)
                at android.view.ViewGroup.layout(ViewGroup.java:4966)
                at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
                at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
                at android.view.View.layout(View.java:15596)
                at android.view.ViewGroup.layout(ViewGroup.java:4966)
                at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2072)
                at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1829)
                at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
                at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
                at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
                at android.view.Choreographer.doCallbacks(Choreographer.java:580)
                at android.view.Choreographer.doFrame(Choreographer.java:550)
                at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
                at android.os.Handler.handleCallback(Handler.java:739)
                at android.os.Handler.dispatchMessage(Handler.java:95)
                at android.os.Looper.loop(Looper.java:135)
                at android.app.ActivityThread.main(ActivityThread.java:5221)
                at java.lang.reflect.Method.invoke(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:372)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)</p>
  </blockquote>
  
  <p>Here is my activity code:</p>
  
  <pre><code>public class splashScreen extends Activity {
  
  // Splash screen timer
  private static int SPLASH_TIME_OUT = 6000;
  
  @Override
  protected void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.splashscreen);
  
      /*if(!isNetworkAvailable())
      {
          new AlertDialog.Builder(this)
                  .setTitle("No Internet Access")
                  .setMessage("Whoops, Internet Required. Please connect to the internet and try again")
                  .setIcon(android.R.drawable.ic_dialog_alert)
                  .show();
  
      }else{*/
  
      new Handler().postDelayed(new Runnable() {
  
          @Override
          public void run() {
              Intent mainIntent = new Intent(splashScreen.this, MainActivity.class);
              splashScreen.this.startActivity(mainIntent);
              splashScreen.this.finish();
          }
      }, SPLASH_TIME_OUT);
  }}
  </code></pre>
  
  <p>Has anyone got this error before/can anyone help me with this error?</p>