Immutable bitmap crash error

前端 未结 5 990
故里飘歌
故里飘歌 2020-12-02 10:58
java.lang.IllegalStateException: Immutable bitmap passed to Canvas constructor
at android.graphics.Canvas.(Canvas.java:127)
at app.test.canvas.StartActiv         


        
5条回答
  •  没有蜡笔的小新
    2020-12-02 11:47

    in order to minimize memory usage, you can check out this post about converting/decoding a mutable bitmap straight from the resources :

    https://stackoverflow.com/a/16314940/878126

提交回复
热议问题