title: Android XXXX byte external allocation too large for this process
body: <p>I am got struck with a strange issue. I am writing an adroid application to view videos from a server. The application have different layouts and user can switch each layout as per his needs. The different layouts are loaded using different images. Some times I am getting a force close and when I checked the log, it gives an error "XXXX byte external allocation too large for this process", "VM won't let us allocate XXXX bytes". Could somebody tell me any specific reason for this error and how to solve it?</p>
  
  <p>I am not getting the error in the emulator. But getting the error in the Device only.</p>
  
  <p>Actually I have three activities. When I am switching between activities its working fine. But when I press home button of the the device when activity1 is active and then take aplication again again. Not activity1 is active and then I try to switch to activity2 the above error happens. The error happens after setContentView method. (That is I hae put a log before the setContentView method. After that no log appears)</p>
  
  <p>I am getting this error in sony xperia device only. I have checked this with LG optimus (low memory than sony experia). But in that phone it is working fine. Also samsung galaxy s2 also its working fine. Could any one comment on it?</p>
  
  <p>I have put try catch (Exception and Error) but not getting where the exact error occures.</p>
  
  <p>I am getting this error frequently on Sony Experia only. I have checked this with Nexus, Samsung S2, even LG Optimus. But in those models, error occures very rarely.</p>