How do i change Object to String in a class which extends AsyncTask?

Posted by Filip V. on Stack Overflow See other posts from Stack Overflow or by Filip V.
Published on 2012-09-08T15:28:18Z Indexed on 2012/09/08 15:38 UTC
Read the original article Hit count: 154

Filed under:
|

I'm learning from Google's Android developing tutorial and i came across a problem. On this link https://developer.android.com/training/basics/network-ops/connecting.html#AsyncTask it says to create a class that extends AsyncTask.

So when i write the class it automatically implements the method as follows:

private Object doInBackground(Object... args) {..} //it's fine

but when i try writing just as it says in the tutorial:

private String doInBackground(String... args) {..} //it gives an error

and the error says: The method doInBackground(String...) of type MainActivity.DownloadWebpageText must override a superclass method.

So how do i change Object to String without getting an error there?

© Stack Overflow or respective owner

Related posts about android

Related posts about android-asynctask