title: Android - onPause, onCreate, setContentView not working - method X is undefined for the type myMain
body: <p>I have recently picked up a project from a few months ago. Went to re-open the project and found a few of the following errors:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
  </code></pre>
  
  <p>Gives the error: The method onCreate(Bundle) of type myMain must override or implement a supertype method</p>
  
  <pre><code>super.onCreate(savedInstanceState);
      setContentView(R.layout.splashscreen);
  </code></pre>
  
  <p>Gives the errors:  The method onCreate(Bundle) is undefined for the type Activity
  and The method onCreate(Bundle) is undefined for the type Activity.</p>
  
  <pre><code>@Override
  protected void onPause() {
  </code></pre>
  
  <p>Gives the error: The method onPause() of type myMain must override or implement a supertype method</p>
  
  <p>I have created a new project with identical code for the first section (see code block 2) and do not receive any errors. I am certain it is a small config/code change I cannot pin down that will solve all these problems in one sweep.</p>
  
  <p>Full code is:
      package com.myapp.app;</p>
  
  <pre><code>import android.app.Activity;
  import android.content.Intent;
  import android.media.MediaPlayer;
  import android.os.Bundle;
  
  public class myMain extends Activity {
  
  MediaPlayer mpSplash;
  
  @Override
  // onCreate works like in the activity diagram from tutorial.
  public void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.splashscreen);
  
      mpSplash = MediaPlayer.create(this, R.raw.logo_noise);
      mpSplash.start();
      Thread logoTimer = new Thread()
      {
          public void run()
          {
              try{
                  int logoTimer = 0;
                  while(logoTimer &lt; 2000)
                  {
                  sleep(100);
                  logoTimer = logoTimer +100;
                  }
                  startActivity(new Intent ("com.myapp.app.CLEARSCREEN"));
              } catch (InterruptedException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
  
              finally{
                  finish(); // shut down class
              }
          }
      };
      logoTimer.start();
  }
  
  @Override
  protected void onPause() {
      // TODO Auto-generated method stub
      super.onPause();
  }
  
  @Override
  protected void onDestroy() {
      // TODO Auto-generated method stub
      super.onDestroy();
      mpSplash.release();
  }
  
  @Override
  protected void onRestart() {
      // TODO Auto-generated method stub
      super.onRestart();
      mpSplash.pause();
  }
  
  @Override
  protected void onResume() {
      // TODO Auto-generated method stub
      super.onResume();
      mpSplash.start();
  }
  
  @Override
  protected void onStop() {
      // TODO Auto-generated method stub
      super.onStop();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>CODE BLOCK 2</p>
  
  <pre><code>import android.app.Activity;
  import android.os.Bundle;
  
  public class myMain extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
      }
  }
  </code></pre>
  
  <p>I have searched around and found mainly overly complex and unrelated issues such as:
  import of android.r
  Updating the build path
  Re-importing the project
  creating new references to classes.
  Configuring proguard?
  None of the above have seemed to work.</p>
  
  <p>Any help that anyone could provide on this issue would be greatly appreciated.</p>