Netroid icon indicating copy to clipboard operation
Netroid copied to clipboard

CacheDispatcher 缓存问题,求解决方案,急

Open JasonMiss opened this issue 7 years ago • 0 comments

java.lang.IllegalMonitorStateException com.duowan.mobile.netroid.CacheDispatcher.run(CacheDispatcher.java:91)

代码块: public static RequestQueue init(Context ctx) { if (mRequestQueue == null) { // 创建Netroid主类,指定硬盘缓存方案 Network network = new BasicNetwork(new HurlStack(null), HTTP.UTF_8); mRequestQueue = new RequestQueue(network, RequestQueue.DEFAULT_NETWORK_THREAD_POOL_SIZE, new DiskCache( new File(ctx.getCacheDir(), "netroid"), 50 * 1024 * 1024)); // 注:ImageLoader及FileDownloader不是必须初始化的组件,如果没有用处,不需要创建实例 mFileDownloader = new FileDownloader(mRequestQueue, 1);

        mRequestQueue.start();
    }
    return mRequestQueue;
}

JasonMiss avatar May 28 '18 03:05 JasonMiss