“Canvas: trying to draw too large bitmap” when Android N Display Size set larger than Small

后端 未结 12 1451
清酒与你
清酒与你 2020-11-27 14:51

I have a published app that is crashing at startup on Android N when the newly introduced Display size OS setting is set to too large a value.

When I lo

12条回答
  •  醉话见心
    2020-11-27 15:20

    I my case, moving the (hi-res) splash bitmap from drawable to drawable-xxhdpi was the solution.

    I had the same problem. I didn't suspect my splash screen to be the problem, since it is displayed when the app is started, but it turned out the splash screen is the problem.

    The splash screen in my case has xxhdpi resolution, and it was mistakenly placed in the drawable folder, instead of drawable-xxhdpi. This made Android assume the splash screen had mdpi resolution and scale the image to 3*3 times it's required size and trying to create a bitmap.

提交回复
热议问题