It was happening with me at some minutes ago and I found the reason!
This was the code that was causing it:
Canvas pattern = new Canvas();
Bitmap bitmapPattern = Bitmap.createBitmap(pattern.getWidth(),canvas.getHeight(),Bitmap.Config.ARGB_8888);
pattern.setBitmap(bitmapPattern);
pattern.drawLine(0, 0, 1, 1, paintStroke);
paintFill.setShader(new BitmapShader(bitmapPattern, TileMode.REPEAT, TileMode.REPEAT));
and the reason is: "pattern.getWidth(),canvas.getHeight()", those parameters may be infinite, I didn't define nothing on canvas yet! CHanging it to numbers I get free from that error!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…