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

后端 未结 12 1465
清酒与你
清酒与你 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:33

    I checked the Logcat

    Process: co.coolresume, PID: 11145 java.lang.RuntimeException: Canvas: trying to draw too large(572166144bytes) bitmap. at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229) at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:97) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:529) at android.widget.ImageView.onDraw(ImageView.java:1367) at android.view.View.draw(View.java:19380)

    I solved the error using the next manifest

     
        
            
                
    
                
            
        
    
    

提交回复
热议问题