Getting OutOfMemoryException in Xamarin

前端 未结 9 2236
情深已故
情深已故 2020-12-03 00:34

java.lang.OutOfMemoryError. Consider increasing the value of $(JavaMaximumHeapSize). Java ran out of memory while executing \'java.exe\'

相关标签:
9条回答
  • 2020-12-03 01:07

    The selected answer lead me in the right direction, but for Visual Studio 2017, the screen looks like:

    0 讨论(0)
  • 2020-12-03 01:08

    Increasing java max heap size works for me

    0 讨论(0)
  • 2020-12-03 01:09

    In my experience, memory issues ONLY happen on the android version of the Xamarin.Forms app. And it always have to deal with large-size images. I've dealt with this problem by using FFImageLoading(https://github.com/luberda-molinet/FFImageLoading)

    Replace your

    <Image Source="waterfront.jpg" />
    

    With

    <ffimageloading:CachedImage Source="waterfront.jpg"
    DownsampleToViewSize = true,
    BitmapOptimizations = true/>
    

    You will see a drastic improvements in performance, and it will also solve your memory problems.

    0 讨论(0)
提交回复
热议问题