Filedownloader: Debug与Release逻辑不一样吗

Created on 3 Jul 2017  ·  6Comments  ·  Source: lingochamp/FileDownloader

如题
我在debug模式下下载
:filedownloader进程oom
看dump信息okio的数据两百多mb
在release下就没有这种情况,可以正常下载

question

Most helpful comment

问题解决了
是因为我在OkHttpClient中引入了HttpLoggingInterceptor
而在debug模式日志输出模式为body
现将下载的logginginterceptor 移除就可以正常下载了

All 6 comments

Debug与Release逻辑不一样吗?

FileDownloader release与debug没有任何不同。

看dump信息okio的数据两百多mb?

FileDownloader本身没有依赖okio,你用的是什么版本?

用的1.5.8配合自定义okhttpclient

因为是放到Observable里面
怀疑是没有背压导致
@Override public Observable<Integer> startDownload(DownloadInfo info) { return Observable.fromCallable(() -> FileDownloader.getImpl() .create(info.getAppUrl()) .setListener(DownloadListenerWrapper.getListener(info)) .start()); }
很奇怪为什么release版没有这个问题

问题解决了
是因为我在OkHttpClient中引入了HttpLoggingInterceptor
而在debug模式日志输出模式为body
现将下载的logginginterceptor 移除就可以正常下载了

okay~

@ddrandy 谢谢提醒。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asdf19910719 picture asdf19910719  ·  4Comments

techGay picture techGay  ·  3Comments

chriswiesner picture chriswiesner  ·  4Comments

itsmallsun picture itsmallsun  ·  4Comments

itsmallsun picture itsmallsun  ·  5Comments