首页 > 代码库 > Android java.lang.IllegalArgumentException: Object returned from onCreateLoader must not be a non-static inn

Android java.lang.IllegalArgumentException: Object returned from onCreateLoader must not be a non-static inn

AsyncTaskLoader: http://developer.Android.com/intl/zh-CN/reference/android/content/AsyncTaskLoader.html 

错误信息:

java.lang.IllegalArgumentException: Object returned from onCreateLoader must not be a non-static inner member class: DownloadTask  

原因:

public static class DownloadTask extends AsyncTaskLoader<D> { 

必须static

Android java.lang.IllegalArgumentException: Object returned from onCreateLoader must not be a non-static inn