Connecting to the network
<p>I'm starting with android, my question is regarding to this official tutorial:</p>

<blockquote>
  <p><a href="http://developer.android.com/training/basics/network-ops/connecting.html" rel="nofollow">http://developer.android.com/training/basics/network-ops/connecting.html</a></p>
</blockquote>

<p>In the "Perform network operations on a Separate Thread", I have the exact same code in eclipse and I get the following error in eclipse:</p>

<pre><code>The type MainActivity.DownloadWebpageText must implement the inherited abstract method AsyncTask.doInBackground(Object...)
</code></pre>

<p>I understand that to override <code>doInBackground()</code> it must get an object as parameter and I expecting and String...</p>

<p>How do i solve that?</p>

<p>I'm pretty confused, because this code is in the main android training section.</p>

<p>Thank you very much and merry christmas!</p>

<p>EDIT: Here's my code. Same code that the guide i linked:</p>

<pre><code>package com.example.com.example.networkoperations;

import java.io.IOException;

import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity implements OnClickListener {

    final String LOG_TAG = "Connectivity tests (chux)";

    Button btn;
    TextView tv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        btn = (Button) findViewById(R.id.button);
        btn.setOnClickListener(this);
        tv = (TextView) findViewById(R.id.textView1);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    @Override
    public void onClick(View arg0) {
        tvText("Clicado!");
        ConnectivityManager connMgr = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
        NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
        if (networkInfo != null &amp;&amp; networkInfo.isConnected()){
            new DownloadWebpageText().execute("http://mydomain.com");
        }
        else
            tvText("No hay conexión a internet");
    }


    private void tvText(String text){
        String oldText = tv.getText().toString() + "\n";
        tv.setText(oldText + text);

    }

    private class DownloadWebpageText extends AsyncTask{
        @Override
        protected String doInBackground(String... urls) {

            // params comes from the execute() call: params[0] is the url.
            try {
                return downloadUrl(urls[0]);
            } catch (IOException e) {
                return "Unable to retrieve web page. URL may be invalid.";
            }
        }
        // onPostExecute displays the results of the AsyncTask.
        @Override
        protected void onPostExecute(String result) {
            tv.setText(result);
       }

    }

}
</code></pre>
