title: galaxy s4 and maybe all HD phones? out of memory error inflating layout
body: <p>So this app I am working on, works just fine on a really old miserable Android 2.3.3 phone. However when running it on the GS4, the GS4 is throwing out of memory exceptions every time is has to load a resource from the drawables, that is predefined in the xml.</p>
  
  <pre><code>&lt;ImageView
          android:id="@+id/ivLearnMore"
          android:layout_width="match_parent"
          android:layout_height="200dp"
          android:layout_weight="1"
          android:scaleType="fitCenter"
          android:src="@drawable/learn_more" /&gt;
  </code></pre>
  
  <p>For example this Imageview will throw an exception when inflating the layout because it already has an image assigned. (256x256)</p>
  
  <p>what is going on?</p>
  
  <pre><code>05-08 10:33:54.972: E/dalvikvm-heap(24423): Out of memory on a 16777232-byte allocation.
  05-08 10:33:54.972: I/dalvikvm(24423): "main" prio=5 tid=1 RUNNABLE
  05-08 10:33:54.972: I/dalvikvm(24423):   | group="main" sCount=0 dsCount=0 obj=0x41187b38 self=0x40dd1b68
  05-08 10:33:54.972: I/dalvikvm(24423):   | sysTid=24423 nice=0 sched=0/0 cgrp=apps handle=1074533852
  05-08 10:33:54.972: I/dalvikvm(24423):   | state=R schedstat=( 0 0 0 ) utm=147 stm=1265 core=0
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.content.res.Resources.loadDrawable(Resources.java:2854)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.view.View.&lt;init&gt;(View.java:3460)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:446)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:176)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:172)
  05-08 10:33:54.972: I/dalvikvm(24423):   at java.lang.reflect.Constructor.constructNative(Native Method)
  05-08 10:33:54.972: I/dalvikvm(24423):   at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.view.LayoutInflater.createView(LayoutInflater.java:593)
  05-08 10:33:54.972: I/dalvikvm(24423):   at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.view.LayoutInflater.inflate(LayoutInflater.java:467)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  05-08 10:33:54.972: I/dalvikvm(24423):   at com.travelstorysgps.travelstorys.FragmentInfo.onCreateView(FragmentInfo.java:54)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:429)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.os.Handler.handleCallback(Handler.java:725)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.os.Handler.dispatchMessage(Handler.java:92)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.os.Looper.loop(Looper.java:137)
  05-08 10:33:54.972: I/dalvikvm(24423):   at android.app.ActivityThread.main(ActivityThread.java:5293)
  05-08 10:33:54.972: I/dalvikvm(24423):   at java.lang.reflect.Method.invokeNative(Native Method)
  05-08 10:33:54.972: I/dalvikvm(24423):   at java.lang.reflect.Method.invoke(Method.java:511)
  05-08 10:33:54.972: I/dalvikvm(24423):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
  05-08 10:33:54.972: I/dalvikvm(24423):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
  05-08 10:33:54.972: I/dalvikvm(24423):   at dalvik.system.NativeStart.main(Native Method)
  05-08 10:33:54.972: D/skia(24423): --- decoder-&gt;decode returned false
  05-08 10:33:54.972: D/AndroidRuntime(24423): Shutting down VM
  05-08 10:33:54.972: W/dalvikvm(24423): threadid=1: thread exiting with uncaught exception (group=0x41186ac8)
  05-08 10:33:54.992: E/AndroidRuntime(24423): FATAL EXCEPTION: main
  05-08 10:33:54.992: E/AndroidRuntime(24423): android.view.InflateException: Binary XML file line #2: Error inflating class &lt;unknown&gt;
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.view.LayoutInflater.createView(LayoutInflater.java:619)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.view.LayoutInflater.inflate(LayoutInflater.java:467)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at com.travelstorysgps.travelstorys.FragmentInfo.onCreateView(FragmentInfo.java:54)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:429)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.os.Handler.handleCallback(Handler.java:725)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.os.Handler.dispatchMessage(Handler.java:92)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.os.Looper.loop(Looper.java:137)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.app.ActivityThread.main(ActivityThread.java:5293)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at java.lang.reflect.Method.invokeNative(Native Method)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at java.lang.reflect.Method.invoke(Method.java:511)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at dalvik.system.NativeStart.main(Native Method)
  05-08 10:33:54.992: E/AndroidRuntime(24423): Caused by: java.lang.reflect.InvocationTargetException
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at java.lang.reflect.Constructor.constructNative(Native Method)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.view.LayoutInflater.createView(LayoutInflater.java:593)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    ... 21 more
  05-08 10:33:54.992: E/AndroidRuntime(24423): Caused by: java.lang.OutOfMemoryError
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.content.res.Resources.loadDrawable(Resources.java:2854)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.view.View.&lt;init&gt;(View.java:3460)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:446)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:176)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:172)
  05-08 10:33:54.992: E/AndroidRuntime(24423):    ... 24 more
  </code></pre>
  
  <p>Here is a exception from a different screen</p>
  
  <pre><code>05-08 10:35:29.565: E/dalvikvm-heap(24774): Out of memory on a 16777232-byte allocation.
  05-08 10:35:29.565: I/dalvikvm(24774): "main" prio=5 tid=1 RUNNABLE
  05-08 10:35:29.565: I/dalvikvm(24774):   | group="main" sCount=0 dsCount=0 obj=0x41187b38 self=0x40dd1b68
  05-08 10:35:29.565: I/dalvikvm(24774):   | sysTid=24774 nice=0 sched=0/0 cgrp=apps handle=1074533852
  05-08 10:35:29.565: I/dalvikvm(24774):   | state=R schedstat=( 0 0 0 ) utm=175 stm=2086 core=1
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.content.res.Resources.loadDrawable(Resources.java:2854)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.view.View.&lt;init&gt;(View.java:3460)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:446)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:176)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:172)
  05-08 10:35:29.565: I/dalvikvm(24774):   at java.lang.reflect.Constructor.constructNative(Native Method)
  05-08 10:35:29.565: I/dalvikvm(24774):   at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.view.LayoutInflater.createView(LayoutInflater.java:593)
  05-08 10:35:29.565: I/dalvikvm(24774):   at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.view.LayoutInflater.inflate(LayoutInflater.java:467)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  05-08 10:35:29.565: I/dalvikvm(24774):   at com.travelstorysgps.travelstorys.FragmentDonate.onCreateView(FragmentDonate.java:53)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:429)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.os.Handler.handleCallback(Handler.java:725)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.os.Handler.dispatchMessage(Handler.java:92)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.os.Looper.loop(Looper.java:137)
  05-08 10:35:29.565: I/dalvikvm(24774):   at android.app.ActivityThread.main(ActivityThread.java:5293)
  05-08 10:35:29.565: I/dalvikvm(24774):   at java.lang.reflect.Method.invokeNative(Native Method)
  05-08 10:35:29.565: I/dalvikvm(24774):   at java.lang.reflect.Method.invoke(Method.java:511)
  05-08 10:35:29.565: I/dalvikvm(24774):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
  05-08 10:35:29.565: I/dalvikvm(24774):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
  05-08 10:35:29.565: I/dalvikvm(24774):   at dalvik.system.NativeStart.main(Native Method)
  05-08 10:35:29.565: D/AbsListView(24774): [unregisterDoubleTapMotionListener]
  05-08 10:35:29.565: I/MotionRecognitionManager(24774):   .unregisterListener : / listener count = 0-&gt;0,  
  05-08 10:35:29.565: D/skia(24774): --- decoder-&gt;decode returned false
  05-08 10:35:29.565: D/AbsListView(24774): unregisterIRListener() is called 
  05-08 10:35:29.565: D/AndroidRuntime(24774): Shutting down VM
  05-08 10:35:29.565: W/dalvikvm(24774): threadid=1: thread exiting with uncaught exception (group=0x41186ac8)
  05-08 10:35:29.595: E/AndroidRuntime(24774): FATAL EXCEPTION: main
  05-08 10:35:29.595: E/AndroidRuntime(24774): android.view.InflateException: Binary XML file line #2: Error inflating class &lt;unknown&gt;
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.view.LayoutInflater.createView(LayoutInflater.java:619)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.view.LayoutInflater.inflate(LayoutInflater.java:467)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at com.travelstorysgps.travelstorys.FragmentDonate.onCreateView(FragmentDonate.java:53)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:429)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.os.Handler.handleCallback(Handler.java:725)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.os.Handler.dispatchMessage(Handler.java:92)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.os.Looper.loop(Looper.java:137)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.app.ActivityThread.main(ActivityThread.java:5293)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at java.lang.reflect.Method.invokeNative(Native Method)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at java.lang.reflect.Method.invoke(Method.java:511)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at dalvik.system.NativeStart.main(Native Method)
  05-08 10:35:29.595: E/AndroidRuntime(24774): Caused by: java.lang.reflect.InvocationTargetException
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at java.lang.reflect.Constructor.constructNative(Native Method)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.view.LayoutInflater.createView(LayoutInflater.java:593)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    ... 21 more
  05-08 10:35:29.595: E/AndroidRuntime(24774): Caused by: java.lang.OutOfMemoryError
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.content.res.Resources.loadDrawable(Resources.java:2854)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.view.View.&lt;init&gt;(View.java:3460)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:446)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:176)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:172)
  05-08 10:35:29.595: E/AndroidRuntime(24774):    ... 24 more
  </code></pre>
  
  <p>and here is a 3rd and different screen</p>
  
  <pre><code>05-08 10:37:20.113: E/dalvikvm-heap(25740): Out of memory on a 16777232-byte allocation.
  05-08 10:37:20.123: I/dalvikvm(25740): "main" prio=5 tid=1 RUNNABLE
  05-08 10:37:20.123: I/dalvikvm(25740):   | group="main" sCount=0 dsCount=0 obj=0x41187b38 self=0x40dd1b68
  05-08 10:37:20.123: I/dalvikvm(25740):   | sysTid=25740 nice=0 sched=0/0 cgrp=apps handle=1074533852
  05-08 10:37:20.123: I/dalvikvm(25740):   | state=R schedstat=( 0 0 0 ) utm=156 stm=1070 core=1
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.content.res.Resources.loadDrawable(Resources.java:2854)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.view.View.&lt;init&gt;(View.java:3460)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:446)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:176)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:172)
  05-08 10:37:20.123: I/dalvikvm(25740):   at java.lang.reflect.Constructor.constructNative(Native Method)
  05-08 10:37:20.123: I/dalvikvm(25740):   at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.view.LayoutInflater.createView(LayoutInflater.java:593)
  05-08 10:37:20.123: I/dalvikvm(25740):   at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.view.LayoutInflater.inflate(LayoutInflater.java:467)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  05-08 10:37:20.123: I/dalvikvm(25740):   at com.travelstorysgps.travelstorys.FragmentConnect.onCreateView(FragmentConnect.java:73)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:429)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.os.Handler.handleCallback(Handler.java:725)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.os.Handler.dispatchMessage(Handler.java:92)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.os.Looper.loop(Looper.java:137)
  05-08 10:37:20.123: I/dalvikvm(25740):   at android.app.ActivityThread.main(ActivityThread.java:5293)
  05-08 10:37:20.123: I/dalvikvm(25740):   at java.lang.reflect.Method.invokeNative(Native Method)
  05-08 10:37:20.123: I/dalvikvm(25740):   at java.lang.reflect.Method.invoke(Method.java:511)
  05-08 10:37:20.123: I/dalvikvm(25740):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
  05-08 10:37:20.123: I/dalvikvm(25740):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
  05-08 10:37:20.123: I/dalvikvm(25740):   at dalvik.system.NativeStart.main(Native Method)
  05-08 10:37:20.123: D/skia(25740): --- decoder-&gt;decode returned false
  05-08 10:37:20.123: D/AndroidRuntime(25740): Shutting down VM
  05-08 10:37:20.123: W/dalvikvm(25740): threadid=1: thread exiting with uncaught exception (group=0x41186ac8)
  05-08 10:37:20.133: E/AndroidRuntime(25740): FATAL EXCEPTION: main
  05-08 10:37:20.133: E/AndroidRuntime(25740): android.view.InflateException: Binary XML file line #2: Error inflating class &lt;unknown&gt;
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.view.LayoutInflater.createView(LayoutInflater.java:619)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.view.LayoutInflater.inflate(LayoutInflater.java:467)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at com.travelstorysgps.travelstorys.FragmentConnect.onCreateView(FragmentConnect.java:73)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:429)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.os.Handler.handleCallback(Handler.java:725)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.os.Handler.dispatchMessage(Handler.java:92)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.os.Looper.loop(Looper.java:137)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.app.ActivityThread.main(ActivityThread.java:5293)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at java.lang.reflect.Method.invokeNative(Native Method)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at java.lang.reflect.Method.invoke(Method.java:511)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at dalvik.system.NativeStart.main(Native Method)
  05-08 10:37:20.133: E/AndroidRuntime(25740): Caused by: java.lang.reflect.InvocationTargetException
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at java.lang.reflect.Constructor.constructNative(Native Method)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.view.LayoutInflater.createView(LayoutInflater.java:593)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    ... 21 more
  05-08 10:37:20.133: E/AndroidRuntime(25740): Caused by: java.lang.OutOfMemoryError
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:817)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.content.res.Resources.loadDrawable(Resources.java:2854)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.view.View.&lt;init&gt;(View.java:3460)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:446)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:176)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:172)
  05-08 10:37:20.133: E/AndroidRuntime(25740):    ... 24 more
  </code></pre>