how to fix java.lang.OutOfMemoryError at android.graphics.Bitmap.createBitmap

how to fix java.lang.OutOfMemoryError at android.graphics.Bitmap.createBitmap

java.lang.OutOfMemoryError:
  at dalvik.system.VMRuntime.newNonMovableArray (Native Method)
  at android.graphics.Bitmap.nativeCreate (Native Method)
  at android.graphics.Bitmap.createBitmap (Bitmap.java:975)
  at android.graphics.Bitmap.createBitmap (Bitmap.java:946)
  at android.graphics.Bitmap.createBitmap (Bitmap.java:877)
  at android.graphics.Bitmap.createScaledBitmap (Bitmap.java:753)
  at com.google.appinventor.components.runtime.util.MediaUtil$2.run (MediaUtil.java:501)
  at java.lang.Thread.run (Thread.java:818)

This is very common error that you will be getting in your android application, and because of these error application might not work on some devices.

Application gives error message like unfortunately application has stopped. when you try to run application it crashes time to time.

Note: There are several reason behind error; there are different types of solution for it; below some of the solution you can go with; i hop it fix your issue.

1. image(pixel)

you know the size of android device; there are different types of android smartphone and tablets; they have different screen sizes.

You might be having lots of images in your app; do not use image if it is not that necessary; when you use the image decrease the image pixel; as you upload it should not exceed the size of screen, as far as possible decrease the image size to fit smallest screen size or use even smaller if you can.


2. image(dpi)

when you put the image in your android devices; try to decrease the dpi of the image.
currently you might be using certain dpi; and you are getting error crashes for some of the devices; now you can decrease the dpi of your image; re-upload to your android app and test it; these above two guide should fix your issue;  java.lang.OutOfMemoryError at android.graphics.Bitmap.createBitmap
TicketCity

Popular Posts

Free German Live TV Kodi 2019 PVR IPTV Simple Client M3U URL

how to find or Locate Original windows 10 Product key on windows 10 PC

how to setup PVR IPTV Simple Client | latest m3u url playlist

Daily stream Free Live TV | World Wide Channels Free IPTV Channels

Amazon FireTV Stick is 32-bit or 64-bit

List of Codes to Get Access to Huge Content in Kodi Ad-dons

how to setup PVR IPTV Simple Client | Free m3u url to watch live TV from the World

Could not connect to network server | Couldn't retrieve directory information in KODI 17 and Kodi 18

how to download ES File Explorer in Fire stick | how to download File using ES File Explorer

There was a problem resetting your PC, No changes were made