title: How to solve java.lang.OutOfMemoryError trouble in Android
body: <p>Altough I have very small size image in drawable folder, I am getting this error from users. And I am not using any bitmap function in code. At least intentionally :)</p>
  
  <pre><code>java.lang.OutOfMemoryError
      at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
      at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:683)
      at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:513)
      at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:889)
      at android.content.res.Resources.loadDrawable(Resources.java:3436)
      at android.content.res.Resources.getDrawable(Resources.java:1909)
      at android.view.View.setBackgroundResource(View.java:16251)
      at com.autkusoytas.bilbakalim.SoruEkrani.cevapSecimi(SoruEkrani.java:666)
      at com.autkusoytas.bilbakalim.SoruEkrani$9$1.run(SoruEkrani.java:862)
      at android.os.Handler.handleCallback(Handler.java:733)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:146)
      at android.app.ActivityThread.main(ActivityThread.java:5602)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:515)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
      at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>According to this stackTrace I'm gettin this error at this line ('tv' is a textView):</p>
  
  <pre><code>tv.setBackgroundResource(R.drawable.yanlis);
  </code></pre>
  
  <p>What is the problem? If you need some other information about code, I can add it.
  Thanks!</p>