final TextView textView= (TextView) findViewById(R.id.text1);

final TextView textView= (TextView) findViewById(R.id.text1);
final AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
Button button= (Button) findViewById(R.id.button1);
builder.setIcon(R.mipmap.ic_launcher);
builder.setTitle("提示");
builder.setMessage("确认退出吗?");
builder.setPositiveButton("确认", new DialogInterface.OnClickListener() {

你可能感兴趣的:(final TextView textView= (TextView) findViewById(R.id.text1);)