out of memory exception
<p>I am getting this exception every now and then and its quite bugging me up.In my app we just scan a barcode and it sends the data from barcode to server.I have tried many things to clean memory and to avoid memory leaks but nothing seems to work .Any help will be appriciated.</p>

<pre><code>java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.zxing.client.android/com.example.mypackage.filename}: android.view.InflateException: Binary XML file line #12: Error inflating class at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1652) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1668) 
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:2852) 
at android.app.ActivityThread.access$1600(ActivityThread.java:117) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:940) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:123) 
at android.app.ActivityThread.main(ActivityThread.java:3703) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: android.view.InflateException: Binary XML file line #12: Error inflating class 
at android.view.LayoutInflater.createView(LayoutInflater.java:518) 
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:408) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:212) 
at android.app.Activity.setContentView(Activity.java:1657) 
at com.example.mypackage.filename.onCreate(TaskSelector.java:164) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1616) 
... 12 more Caused by: java.lang.reflect.InvocationTargetException 
at java.lang.reflect.Constructor.constructNative(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:415) 
at android.view.LayoutInflater.createView(LayoutInflater.java:505) 
... 23 more Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget 
at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:477) 
at android.graphics.Bitmap.createBitmap(Bitmap.java:444) 
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:349) 
at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:498) 
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:473) 
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336) 
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697) 
at android.content.res.Resources.loadDrawable(Resources.java:1709) 
at android.content.res.TypedArray.getDrawable(TypedArray.java:601) 
at android.view.View.(View.java:1951) at android.view.View.(View.java:1899) 
at android.view.ViewGroup.(ViewGroup.java:286) at android.widget.RelativeLayout.(RelativeLayout.java:173) ... 26 more
</code></pre>
