Channel is unrecoverably broken and will be disposed!
16lz
2021-01-26
在Android的联网操作中,出现Channel is unrecoverably broken and will be disposed! ,当时的内心是崩溃的,浏览器连接没问题啊!,然后检查了一遍又一遍的代码,后来知道了,一般出现这种错误是流的操作出现了问题,当时我的代码是
String path="http://192.168.56.1:8080/androidgetimage/106.jpg"; File file=new File(Environment.getExternalStorageDirectory(),getIvName(path)); if (file.exists()){ Uri uri=Uri.fromFile(file); Message message=Message.obtain(); message.what=SUCCESS; message.obj=uri; mhandler.sendMessage(message); Log.i("TAG","从SD卡获取图片");
后来发现是路径拼写错误!,所以说!这种东西尽量Ctrl C,Ctrl V,自己强行装逼,苦了自己!!,如果你也有类似错误不防从流的操作去查找下错误!
更多相关文章
- 图片阴影
- Android(安卓)中TabLayout自定义选择背景滑块的实例代码
- 查看Android的源代码
- 编译出错 ninja: build stopped: subcommand failed Android
- 解决android:layout_marginBottom在RelativeLayout中无效的bug
- android2.2 2.3状态栏区别
- Android第三方文件选择器aFileChooser使用方法详解
- 解决错误ERROR: No suitable Java found. In order to properly
- 实现Android多张图片选择