title: Non-static method execute() cannot be referenced from a static context
body: <p>I don't understand why I'm receiving this compile error; none of my classes or methods involved here are static. Maybe someone can shed some light here.</p>
  
  <p>In my MainActivity class I have declared a public class that extends AsyncTask:</p>
  
  <pre><code>public class AsyncStuff extends AsyncTask&lt;String, Void, String&gt; {
      ...
  }
  </code></pre>
  
  <p>In my non-activity class I have a public function that should fire the async task:</p>
  
  <pre><code>public class Util {
      public void ExecuteAsyncMethod(){
          MainActivity.AsyncStuff.execute(new String[]{"test" }); // error here
      }
  }
  </code></pre>
  
  <p>I have also tried to instantiate an object of the MainActivity.AsyncStuff class and execute its execute() method, but this doesn't work either since it's not in an enclosing class. I can't move it somewhere else because I need to update the UI so it needs to stay in the MainActivity class.</p>
  
  <p>Anyhow, I need help to figure out why my ExecuteAsyncMethod() method doesn't compile.</p>
  
  <p>Thank you!!</p>