The problem is that you are inside another class and passing Intent the wrong context. You must pass the correct context to it. Take a look at the example below.
// your Activity public class MyActivity extends Activity { Context ctx = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ctx = getApplication(); } private final View.OnClickListener btnClick = new View.OnClickListener() { @Override public void onClick(View v) { switch (v.getId()) { case R.id.about_box: Intent i = new Intent(ctx, About.class); startActivity(i); break; } } }
source share