Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

Conversation

@superbderrick
Copy link

Hey mate,
I tried to test your app but it occurred a crash because of big image size..
so I moved the image file from drawable folder to drawable-xxhdpi folder
can you review my changes?

I have referenced the link below.

Thanks,

https://stackoverflow.com/questions/40835514/android-studio-canvas-drawing-too-large-bitmap

--

1374 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   FATAL EXCEPTION: main
1375 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   Process: com.debashis4e.musicx, PID: 5864
1376 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   java.lang.RuntimeException: Canvas: trying to draw too large(150961536bytes) bitmap.
1377 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229)
1378 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:97)
1379 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:529)
1380 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.widget.ImageView.onDraw(ImageView.java:1367)
1381 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.view.View.draw(View.java:20373)
1382 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.view.View.updateDisplayListIfDirty(View.java:19318)
1383 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.view.View.draw(View.java:20096)
1384 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.view.ViewGroup.drawChild(ViewGroup.java:4421)
1385 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4207)
1386 12-15 17:36:21.808 E 5864 5864 AndroidRuntime:   at android.view.View.updateDisplayListIfDirty(View.java:19309)

--

…g size it occurred crash issue with galaxy s7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant