[Solved] My Application won’t start up?


The fact that you have created a constructor for the Something class

public Something(Activity a) {

       click();

}

instead of using onCreate() is probably the source of the error.

Something is derived from Activity, in which you have to override onCreate() at the very least, and set the View of your Activity in it. You haven’t done that, and instead you have created a constructor for Something which is also not allowed.

The solution to your problem is to replace the constructor with onCreate() and set the View of that Activity using setContentView(). Also, you cannot create an Activity object using

new Something(this);

3

solved My Application won’t start up?