为什么会出现空指针异常
addRoom.setOnClickListener(new android.view.View.OnClickListener(){ public void onClick(View v) { builder = new AlertDialog.Builder(RoomSet.this); TableLayout addroom = (TableLayout)getLayoutInflater().inflate(R.layout.addroom, null); builder.setView(addroom); newRoomET = (EditText)findViewById(R.id.addroom_et); builder.setPositiveButton("确定" // 为按钮设置监听器 , new android.content.DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { //此处可执行登录处理 name = newRoomET.getText().toString();//[b]①处[/b] ... } } }}