title: java.lang.RuntimeException: Only one Looper may be created per thread
body: <p>I have a simple thread that goes like this: </p>
  
  <pre><code>public class AwesomeRunnable extends Thread {
  
      Handler thisHandler = null;
      Handler uihandler = null;
      String update = null;
      long time = 0;
  
      public AwesomeRunnable(Handler h, long howLong) {
          uihandler = h;
          time = howLong;
      }
  
      public void run() {
          Looper.prepare();
          thisHandler = new Handler();
    ...
  </code></pre>
  
  <p><strong>EDIT: ADDED CODE THAT STARTS THE RUNNABLE</strong></p>
  
  <pre><code>public class StartCycle implements Runnable {
  
      @Override
      public void run() {
  
          pomodoroLeft = numPomodoro;
          while(pomodoroLeft &gt; 0) {
              pomodoroLeft--;
              actualSeconds = 6 * ONE_SECOND;
              runnable = new AwesomeRunnable(myHandler, actualSeconds);
              runnable.start();
              waitForClock();
  </code></pre>
  
  <p>It is an inner class of a main activity. <strong>This thread</strong>, however runs <strong>not on the main</strong> activity, but inside of <strong>another thread that runs</strong> on the <strong>main</strong> activity. </p>
  
  <p>Anyway, this example is <em>exactly</em> the same as <a href="http://developer.android.com/reference/android/os/Looper.html#quit%28%29">here</a>, but for some reason it gives me java.lang.RuntimeException: Only one Looper may be created per thread.</p>
  
  <p>I did not create any other loopers, at least explicitly anywhere. </p>