I'm pulling my hair out with what looks to be a really simple thing to do. Surely this is just a typo or something stupid, but I'm just not seeing it...
I have an ASyncTask class defined as such (and it compiles fine)
public class SectionRetrieval extends AsyncTask<Void, Void, List<Section>>
protected List<Section> doInBackground(Void... voids)
List<Section> sections = new ArrayList<Section>();
List<Section> sections = new SectionRetrieval().execute();
Error:(472, 63) Gradle: error: incompatible types:
AsyncTask<Void,Void,List<Section>> cannot be converted to List<Section>
You receive whatever you return from doInBackground in the parameter of onPostExecute.
You update the UI from onPostExecute as well.
You could do
execute().get() to have it compile, probably, but I wouldn't recommend that