android的(View v)错误

今天在写Intent时一直错误,
代码是这样的

package h.helloworld;
import android.app.Activity;
import android.view.View;
import android.view.View.OnClickListener;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;

public class helloactivity extends Activity {

/** Called when the activity is first created. */

private Button myBut=null;
private TextView myTxt=null;

@Override

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
myTxt=(TextView)findViewById(R.id.myTxt);
myBut=(Button)findViewById(R.id.myBut);
myBut.setText("点我");
myBut.setOnClickListener( new MybuttonL());
}

class MybuttonL implements OnClickListener{

public void onClick(View v) {

// TODO Auto-generated method stub

Intent intent=new Intent();
intent.setClass(helloactivity.this, helloactivity2.class);
helloactivity.this.startActivity(intent);

}

}

}

默认的onClick是onClick(DialogInterface dialog, int which),一直是报错,
后来看了很久原来是自动导入的包错了
本来是:

import Android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;

应该改为:

import android.view.View;
import android.view.View.OnClickListener;

(from 当年的,已经不存在的,我的百度空间)