Search code examples
androidperformanceandroid-kenburnsview

Getting Out of memory error in Android Studio


I have added the cresentroContainer for rounded image bottom and KenBurnsView library to animate the image. After that I am getting out of memory error and also android studio become very slow.


Solution

  • You would have large images (perhaps large w.r.t your current device whihch has lower heap size in which you are testing) in your drawable, which you are assigning to your views in XML. You can downscale your images and then assign to views programticaly, for downscaling simply load your images via Picasso or Glid. Also You can do android:largeHeap = "true" in your manifest under application tag which is obviously not recommended by many of programmers.