Android trying to create a base class for the Activity classes and app crashes
<p>I thought it would be need if I had a base class for all my screens on android.  Then I would not have to retype in the same stuff,....but it crashes when I replace Activty with cBase (my base class)</p>

<p>base class</p>

<pre><code>public class cBase extends Activity{

  public void onCreate(Bundle savedInstanceState) {

  }

}
</code></pre>

<p>my class that crashes</p>

<pre><code>public class TellaFortuneActivity extends cBase implements OnClickListener {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    // add the add
    // Create the adView
    AdView adView;
    adView = new AdView(this, AdSize.BANNER, "a14e10cb6b18825");

    // Lookup your LinearLayout assuming it’s been given
    // the attribute android:id="@+id/mainLayout"
    LinearLayout layout = (LinearLayout)findViewById(R.id.mainLayout);

    // Add the adView to it
    layout.addView(adView);

    // Initiate a generic request to load it with an ad
    adView.loadAd(new AdRequest());



    // add listeners
    View mAbout = findViewById(R.id.bio);
    mAbout.setOnClickListener(this);

    View mHistory = findViewById(R.id.history);
    mHistory.setOnClickListener(this);

    View mYesNo = findViewById(R.id.butyesno);
    mYesNo.setOnClickListener(this);

    View mSocial = findViewById(R.id.socialgame);
    mSocial.setOnClickListener(this);

    View mWheel = findViewById(R.id.wheelgame);
    mWheel.setOnClickListener(this);

    View mChat = findViewById(R.id.chat);
    mChat.setOnClickListener(this);

    View mTest = findViewById(R.id.test);
    mTest.setOnClickListener(this);       

}

public void onClick(View v) {
    Intent i;
    switch(v.getId())
    {

    case R.id.bio:
        // check data first

            i = new Intent(this, cBio2.class);
            startActivity(i);

        break;

    case R.id.history:
            i = new Intent(this, cHistory.class);
            startActivity(i);
        break;

    case R.id.chat: 
        i = new Intent(this, cChat.class);
        startActivity(i);
        break;      

    case R.id.wheelgame:    
        i = new Intent(this,cYesNoCardDeck.class);
        startActivity(i);           
        break;                  

    case R.id.socialgame:   
        i = new Intent(this,cSocialGame.class);
        startActivity(i); 
        break;              

    case R.id.butyesno: 
        i = new Intent(this, cYesNoDirections.class);
        startActivity(i); 
        break;     

    case R.id.test:
        i = new Intent(this, cYesNoShuffle.class);
        startActivity(i); 
        break;  


       } // end else

   } // end function
} // end class
</code></pre>
