java.lang.RuntimeException: Canvas: trying to draw too large(241864000bytes) bitmap.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Android has some problem with big images, so, probably, the image you're trying to use is too big for Canvas. You can either use Picasso or compress your image to reduce it's size (both pixel wise and filesize wise)

,
via github.com by Unknown author

Picasso or Glide takes more time for to load big image,ya its true you can resize image in Picasso or Glide,but its resolution will not be good at all,you can compress image before load into Picasso or Glide.or same for upload to server for reduce time.

Solutions on the web

via Stack Overflow by Aniello Scartozzi
, 1 year ago
Canvas: trying to draw too large(241864000bytes) bitmap.
via Stack Overflow by Prins Prem
, 5 months ago
Canvas: trying to draw too large(201326592bytes) bitmap.
via Stack Overflow by CantThinkOfAnything
, 4 months ago
Canvas: trying to draw too large(132710400bytes) bitmap.
via Stack Overflow by Francisco
, 11 months ago
Canvas: trying to draw too large(216090000bytes) bitmap.
via Stack Overflow by Dominic Vermeulen-Smith
, 3 months ago
Canvas: trying to draw too large bitmap catch "RuntimeException: Canvas: trying to draw too large..." App Crashing when Adding a Button- Android Canvas: trying to use a recycled bitmap android.graphics.Bitmap in android Attempting to change views on
via GitHub by hypest
, 2 months ago
Canvas: trying to draw too large(132986880bytes) bitmap.
java.lang.RuntimeException: Canvas: trying to draw too large(241864000bytes) bitmap.
at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:260)
at android.graphics.Canvas.drawBitmap(Canvas.java:1415)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:545)
at android.widget.ImageView.onDraw(ImageView.java:1286)
at android.view.View.draw(View.java:17068)
at android.view.View.updateDisplayListIfDirty(View.java:16050)
at android.view.View.draw(View.java:16834)
at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
at android.view.View.updateDisplayListIfDirty(View.java:16045)
at android.view.View.draw(View.java:16834)
at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
at android.view.View.updateDisplayListIfDirty(View.java:16045)
at android.view.View.draw(View.java:16834)
at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
at android.view.View.updateDisplayListIfDirty(View.java:16045)
at android.view.View.draw(View.java:16834)
at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
at android.view.View.updateDisplayListIfDirty(View.java:16045)
at android.view.View.draw(View.java:16834)
at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
at android.view.View.updateDisplayListIfDirty(View.java:16045)
at android.view.View.draw(View.java:16834)
at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
at android.view.View.draw(View.java:17071)
at android.view.View.updateDisplayListIfDirty(View.java:16050)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:656)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:662)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:770)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2796)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2604)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2211)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1246)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6301)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
at android.view.Choreographer.doCallbacks(Choreographer.java:683)
at android.view.Choreographer.doFrame(Choreographer.java:619)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)

Users with the same issue

Once, 5 months ago
Once, 6 months ago
12 times, 6 months ago
89 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.