Skip to content

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

@JasonMiss

Description

@JasonMiss

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions