We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to resolve out of memory exception when loading large images in Android?

When you try to load large size images in image editor in Android, you may get out of memory exception because this application cannot handle large size images. You can resolve this exception by using the following two ways:


Methods to resolve out of memory exception


1. Set largeHeap value as true in Android project.

2. Set largeHeap size for application.


How to set largeHeap value as true in Android project?


Code Snippet


To set largeHeap  value as true in Android project, refer the following code snippet.



To set largeHeap value as true, refer the following steps:

Step 1: Expand properties tab in Android project.




Step 2: In AndroidManifest.xml file, set largeHeap value as true. Please refer the following screenshot for better understanding.




How to set largeHeap size in application?


To set largeHeap size in application, follow the below steps:

Step 1: Right-click the Android project, and then select Properties.












Step 2: In Android options, select Advance and set Java Max Heap size as 1G.




Article ID: Published Date: Last Revised Date: Platform: Control:
8301 01/12/2018 07/06/2018 Xamarin.Forms SfImageEditor
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon