-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
java.lang.IllegalThreadStateException
Thread already started
com.duowan.mobile.netroid.RequestQueue.start(RequestQueue.java:128)
代码块:
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(), DEFAULT_CACHE_DIR), HTTP_DISK_CACHE_SIZE));
// 注:ImageLoader及FileDownloader不是必须初始化的组件,如果没有用处,不需要创建实例
mFileDownloader = new FileDownloader(mRequestQueue, 1);
mRequestQueue.start();
}
return mRequestQueue;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels