写了一段代码出现了下面的错误提示:
构造函数 AlertDialog.Builder(new View.OnClickListener(){})未定义
代码如下:
(红色标记的是出错行)package com.cn.tablelayout;import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;public class TablelayoutActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
     final TextView tv=(TextView)findViewById(R.id.text);
        final EditText edittext1=(EditText)findViewById(R.id.edittext1);
        final EditText edittext2=(EditText)findViewById(R.id.edittext2);
        edittext2.addTextChangedListener(new TextWatcher(){     public void afterTextChanged(Editable arg0) {
    
    
     }     public void beforeTextChanged(CharSequence s, int start, int count,
     int after) {
    
    
     }     public void onTextChanged(CharSequence s, int start, int before,
int count) {
if(s.length()==6){
     tv.setText("请输入六位账号");
}

}
        });
        ImageButton button=(ImageButton)findViewById(R.id.button);
         button.setOnClickListener(new OnClickListener(){ @Override
public void onClick(View v) {
if(edittext1.getText().length()==0||edittext2.getText().length()==0){
AlertDialog.Builder alert=new AlertDialog.Builder(this);                   alert.setTitle("提示");
alert.setMessage("请输入意见和账号");
alert.setPositiveButton("确定", newDialogInterface.OnClickListener(){ @Override
public void onClick(DialogInterface dialog, int which) {


}

});
alert.show();
}

}
          
         });    }  
    
}