Mysterious stacktrace in Android developer console (bitmap size exceeds 32bits)

后端 未结 3 1488
南旧
南旧 2020-11-30 10:37

I\'m getting the following stacktrace in the developer console. Some report say \"the application won\'t start\" or \"crash at startup\".

I don\'t know what to do, i

3条回答
  •  难免孤独
    2020-11-30 11:04

    Bitmap.createBitmap()

    Throws IllegalArgumentException

    if the x, y, width, height values are outside of the dimensions of the source bitmap, or width is <= 0, or height is <= 0

    First make sure your x, y, width and height values are smaller than the source bitmap.

    The issue for me was the matrix. My matrix has a translation value which brought the one of the values outside of the bounds of the input bitmap.

    Hope this helps

提交回复
热议问题