Q: Getting error The constructor Intent(new View.OnClickListener(){}, Class) is undefined in android application code : import android.app.Activity;

import android.content.Intent;

import android.view.View;

import android.view.View.OnClickListener;

import android.os.Bundle;

import android.widget.Button;

import android.widget.RadioButton;

import android.widget.RadioGroup;

import android.widget.Toast;


public class NumberModeSizeOptionsActivity extends Activity {

    private RadioGroup radioGroupId;
    private RadioButton radioBoard;
    private Button button;

    @Override

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.board_option);

        addButtonListener();

      }


    public void addButtonListener() {

           radioGroupId = (RadioGroup) findViewById(R.id.radioBoard);       
           button = (Button) findViewById(R.id.btnStart);

           button.setOnClickListener(new OnClickListener() {

                @Override
             public void onClick(View v) {

                   // get the selected radio button from the group

                  int selectedOption = radioGroupId.getCheckedRadioButtonId();


                  // find the radiobutton by the previously returned id     
                  radioBoard = (RadioButton) findViewById(selectedOption);
                  startActivity(new Intent(this, NumberBoardActivity.class));
                  //startActivity(new Intent("org.test.slidingtiles.NumberBoardActivity"));
                  Toast.makeText(NumberModeSizeOptionsActivity.this, radioBoard.getText(), Toast.LENGTH_SHORT).show();
            }

        });

    }


}


A: change the startIntent to this
startActivity(new Intent(NumberModeSizeOptionsActivity.this, NumberBoardActivity.class));


A: try this code  : (change in intent statement) and check if the second activity NumberBoardActivity is defined in android manifest.xml:
@Override

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.board_option);
    radioGroupId = (RadioGroup) findViewById(R.id.radioBoard);       
    button = (Button) findViewById(R.id.btnStart);

     button.setOnClickListener(new OnClickListener() {

            @Override
         public void onClick(View v) {

               // get the selected radio button from the group

              int selectedOption = radioGroupId.getCheckedRadioButtonId();


              // find the radiobutton by the previously returned id     
              radioBoard = (RadioButton) findViewById(selectedOption);
              startActivity(new Intent(NumberModeSizeOptionsActivity.this, NumberBoardActivity.class));
              //startActivity(new Intent("org.test.slidingtiles.NumberBoardActivity"));
              Toast.makeText(NumberModeSizeOptionsActivity.this, radioBoard.getText(), Toast.LENGTH_SHORT).show();
        }

    });

  }

}
