我有一个手动绘制的自定义视图,以模糊图像我在我的应用程序中经常遇到此错误使用的代码
Bitmap bitmap = sentBitmap.copy(sentBitmap.getConfig(), true);
这个错误是: -
java.lang.StackOverflowError
at android.graphics.Bitmap.getConfig(Bitmap.java:841)
at android.view.GLES20Canvas.setupModifiers(GLES20Canvas.java:1119)
at android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:715)
at android.view.GLES20RecordingCanvas.drawBitmap(GLES20RecordingCanvas.java:117)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:393)
at android.widget.ImageView.onDraw(ImageView.java:892)
at android.view.View.draw(View.java:11252)
at android.view.View.getDisplayList(View.java:10691)
at android.view.ViewGroup.drawChild(ViewGroup.java:5727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5005)
at android.view.View.getDisplayList(View.java:10689)
at android.view.ViewGroup.drawChild(ViewGroup.java:5727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5005)
at android.view.View.getDisplayList(View.java:10689)
at android.view.ViewGroup.drawChild(ViewGroup.java:5727)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5005)
at android.view.View.draw(View.java:11255)
at android.view.View.getDisplayList(View.java:10691)
at android.view.ViewGroup.drawChild(ViewGroup.java:5727)