android - 消费者关闭输入 channel 或发生错误。事件=0x8

标签 android

01-03 11:28:47.499: ERROR/InputDispatcher(164): channel '4085fe50 com.bce.tip/com.bce.tip.core.MenuActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
01-03 11:28:47.499: ERROR/InputDispatcher(164): channel '4085fe50 com.bce.tip/com.bce.tip.core.MenuActivity (server)' ~ Channel is unrecoverably broken and will be disposed!`

当我点击 Imageview Action 调用时,我将此 onclick 调用到另一个图层类

最佳答案

它在几分钟前发生在我身上,我找到了原因! 这是导致它的代码:

    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));

原因是:“pattern.getWidth(),canvas.getHeight()”,那些参数可能是无限的,我还没有在 Canvas 上定义任何东西!将其更改为数字,我就摆脱了那个错误!

关于android - 消费者关闭输入 channel 或发生错误。事件=0x8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13869289/

相关文章:

android - 具有多种布局的 ExpandableListView

android - 将数据从 DialogFragment 返回到适配器

Android Camera2预览偶尔旋转90度

android - 集成 glide gradle 后应用程序崩溃

android - 当对话框被关闭时执行 UI 相关任务的正确方法是什么

android - 滚动时单击不在 CoordinatorLayout 中的 RecyclerView 上工作

android - Android 中类似 Facebook 的标题栏

android - 未找到汽车 Intel x86 Atom 系统镜像 SDK 管理器

android - Kindle Fire 和谷歌地图 api

android - NullpointerException 覆盖 arrayadapter 中的 getview