android.view.InflateException: Binary XML file line #142: Error inflating class <unknown> crash in samsung s3 and s4-Collection of common programming errors

I developed an application which supports multiple devices the .apk will run fine in every device but in samsung s3 and s4 crash happens this is the error log for the crash and respective layout code.

android.view.InflateException: Binary XML file line #142: Error inflating class 
com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
Caused by: java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:636)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:484)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:813)
at android.content.res.Resources.loadDrawable(Resources.java:2822)
at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
at android.view.View.(View.java:3419)
at android.view.View.(View.java:3356)
at android.view.ViewGroup.(ViewGroup.java:426)
at android.widget.RelativeLayout.(RelativeLayout.java:184)







    

        
    

    

        
    

    

        
    

    

        
    

    

        
    




    

        

            

            
        

        

            

            

            

                

                    

                    

                    

                    
                    

                    
                

                

                    

                    

                    

                    
                    

                    
                
            

            

                

                    

                    

                    

                    

                    
                    

                    
                

                

                    

                    

                    

                    

                    
                    

                    
                
            
        

        

            

            

                

                
            
        
    

with my minimal knowledge i understood that its due to out of memory error.

Now the question how to get rid of that error as that is not reproducible every time.

i googleed it and find some soltions

1. http://stackoverflow.com/questions/7608966/android-view-inflateexception-binary-xml-unknown-     and-outofmemoryerror 

in this so post the issue is due to different orientation but my activity orientation is locked no chance of calling oncreate of activity even if orientation changes according my understanding 


2.http://stackoverflow.com/questions/15382361/android-inflateexception-binary-xml-file-line-error-inflating-class-unknown

in this so the issue has been addressed by changing the values.

there are no large images even in the layout background the large image is 86kb is that the one causing oom

but the crash happens regularly in samsung s3.

any links will helps me a lot.

Thanks in advance.