xuexiangjys / XUpdate

🚀A lightweight, high availability Android version update framework.(一个轻量级、高可用性的Android版本更新框架)
https://github.com/xuexiangjys/XUpdate/wiki
Apache License 2.0
2.33k stars 406 forks source link

md5计算存在问题 #63

Closed kangsafe closed 5 years ago

kangsafe commented 5 years ago

apk文件大小46M,出现奔溃,追踪的问题根源在Md5Utils.getFileMD5方法抛出异常,进行如下修改: MessageDigest digest = MessageDigest.getInstance("MD5"); in = new FileInputStream(file); byte[] buffer = new byte[1024];//10k int readLen; while ((readLen = in.read(buffer)) != -1) { digest.update(buffer, 0, readLen); }

xuexiangjys commented 5 years ago

问题已经改了: dfb82c6dae3fb4f27c3dfd82636a3f44e2282165 暂时不发新版本,你可以重写一下DefaultInstallListenercheckApkFile方法暂时先用着