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

weixin_34088583發表於2017-03-22

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

相關文章