Async task does not let me override onPostExecute (method does not override method from it's superclass)
<p>i'm creating an app that grabs list of playlists on YouTube. It used to be a list of videos, but i've changed the code and now it did not let me override that method.</p>

<p>My understanding is that i should change the "extends AsyncTask" with the new Playlist value instead of Video as it was before, but it still did not work.</p>

<p>it was:</p>

<pre><code>public abstract class GetPlaylistAsyncTask extends AsyncTask&lt;String, Void, Pair&lt;String, List&lt;Video&gt;&gt;&gt; {
</code></pre>

<p>and now is:</p>

<pre><code>public abstract class GetPlaylistAsyncTask extends AsyncTask&lt;String, Void, Pair&lt;String, List&lt;Playlist&gt;&gt;&gt; {
</code></pre>

<p>This is where is the error:</p>

<pre><code>mPlaylist = new Playlist(mPlaylistId);
initAdapter(mPlaylist);
new GetPlaylistAsyncTask(mYouTubeDataApi, mTitle, mSearchQuery) {
    @Override
    public void onPostExecute(Pair&lt;String, List&lt;Playlist&gt;&gt; result) {
        handleGetPlaylistResult(mPlaylist, result);
    }
}.execute(mPlaylist.playlistId, mPlaylist.getNextPageToken());
</code></pre>

<p>And this is the AsyncTask:</p>

<pre><code>public abstract class GetPlaylistAsyncTask extends AsyncTask&lt;String, Void, Pair&lt;String, List&lt;Playlist&gt;&gt;&gt; {
    private static final String TAG = "GetPlaylistAsyncTask";
    private static final Long YOUTUBE_PLAYLIST_MAX_RESULTS = 50L;

    private static final String YOUTUBE_VIDEOS_PART = "snippet,contentDetails,statistics"; // video resource properties that the response will include.
    private static final String YOUTUBE_VIDEOS_FIELDS = "items(id,snippet(title,description,thumbnails/high),contentDetails/duration,statistics)"; // selector specifying which fields to include in a partial response.

    private YouTube mYouTubeDataApi;
    private String mTitle;
    private String mSearchQuery;

    public GetPlaylistAsyncTask(YouTube api, String title, String searchQuery) {
        mYouTubeDataApi = api;
        mTitle = title;
        mSearchQuery = searchQuery;
    }

    @Override
    protected Pair&lt;String, List&lt;Playlist&gt;&gt; doInBackground(String... params) {

        SearchListResponse searchResponse;
        try {
            YouTube.Search.List search = mYouTubeDataApi.search().list("id,snippet");

            search.setKey(ApiKey.YOUTUBE_API_KEY);
            search.setQ(mTitle + " " + mSearchQuery);

            search.setType("video");
            search.setFields("items(id/kind,id/videoId,snippet/title,snippet/thumbnails/default/url)");
            search.setMaxResults(YOUTUBE_PLAYLIST_MAX_RESULTS);
            searchResponse = search.execute();
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        }

        if (searchResponse == null) {
            Log.e(TAG, "Failed to get playlist");
            return null;
        }

        ArrayList videoIds = new ArrayList();

        for (SearchResult item : searchResponse.getItems()) {
            videoIds.add(item.getId().getVideoId());
        }
        VideoListResponse videoListResponse = null;
        try {
            videoListResponse = mYouTubeDataApi.videos()
                    .list(YOUTUBE_VIDEOS_PART)
                    .setFields(YOUTUBE_VIDEOS_FIELDS)
                    .setKey(ApiKey.YOUTUBE_API_KEY)
                    .setId(TextUtils.join(",", videoIds)).execute();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return new Pair(searchResponse.getNextPageToken(), videoListResponse.getItems());
    }
}
</code></pre>

<p>i don't get what is wrong on my code, i'll appreciate if you can point me on the right direction. Thanks in advance!</p>