zyq
zyq
杀死app进程后,再重新进入,执行同样的下载,则不会出现报错。
supplement logs:"targetSdk29" on Android 10, 9, 5.1; Find that error sence "targetSdk29-Android 10",has only "blockEnd:0 ",then "cause:ERROR realCause:java.io.IOException: The current offset on block-info isn't update correct, 3397947 != 8787995 on...
Happend on Device Android 10,Android11 when targetSdk >= 29 , in the Insue#432 targetSdkVersion 29,Android 10,cause:ERROR realCause:java.io.IOException: The current offset on block-info isn't update correct, 2920 != 10006923 on 1
progress回调和pending回调中totalBytes一直是0;所以一直没有正确的进度显示; 我的解决方案是自己单独使用HttpURLConnection 获取文件总大小,然后保存下来用这个值去计算进度。 有一个问题值的注意的是,不是所有的文件都无法获取大小,像这个我们服务器https://www.bus365.com/public/phoneClient/BUS365.apk 获取不到,但是豌豆荚https://www.wandoujia.com/apps/2236553/download/dot?ch=detail_normal_dl 就可以。 很有可能是文件服务器对文件进行了压缩导致的。 `URL url = new URL(apkUrl); HttpURLConnection urlcon = (HttpURLConnection) url.openConnection(); //处理下载读取长度为-1 问题 urlcon.setRequestProperty("Accept-Encoding", "*"); urlcon.connect(); int l = urlcon.getContentLength(); int total = (int)...
如何限制超过两行末尾加省略号呢?