import android.app.Activity;
import android.content.ContentValues;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;public class CRMModActivity extends Activity { TextView addtext1;
TextView addtext2;
TextView addtext3;
TextView addtext4;
TextView addtext5;
EditText addet1;
EditText addet2;
EditText addet3;
EditText addet4;
EditText addet5;
Button button1;
Button button2;
int selectId =0 ;

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.addview); SQLiteOpenHelper dbHelper = new DBHelper(this);
final SQLiteDatabase db = dbHelper.getWritableDatabase();
final Bundle bundle = this.getIntent().getExtras();

** selectId = bundle.getInt("_id"); addtext1 = (TextView) findViewById(R.id.addtext1);
addtext2 = (TextView) findViewById(R.id.addtext2);
addtext3 = (TextView) findViewById(R.id.addtext3);
addtext4 = (TextView) findViewById(R.id.addtext4);
addtext5 = (TextView) findViewById(R.id.addtext5); addet1 = (EditText) findViewById(R.id.addet1);
addet1.setText(bundle.getString(DBHelper.CLIENT_TABLE_NAME_FIELD)); addet2 = (EditText) findViewById(R.id.addet2);
addet1.setText(bundle.getString(DBHelper.CLIENT_TABLE_LINKMAN_FIELD)); addet3 = (EditText) findViewById(R.id.addet3);
addet1.setText(bundle.getString(DBHelper.CLIENT_TABLE_PHONE_FIELD)); addet4 = (EditText) findViewById(R.id.addet4);
addet1.setText(bundle.getString(DBHelper.CLIENT_TABLE_EMAIL_FIELD)); addet5 = (EditText) findViewById(R.id.addet5);
addet1.setText(bundle.getString(DBHelper.CLIENT_TABLE_ADDRESS_FIELD)); button1 = (Button) findViewById(R.id.button1);
button2 = (Button) findViewById(R.id.button2); button1.setOnClickListener(new OnClickListener() { public void onClick(View v) {
// TODO Auto-generated method stub

ContentValues values = new ContentValues();
values.put(DBHelper.CLIENT_TABLE_NAME_FIELD, addet1.getText()
.toString());
values.put(DBHelper.CLIENT_TABLE_LINKMAN_FIELD, addet2
.getText().toString());
values.put(DBHelper.CLIENT_TABLE_PHONE_FIELD, addet3.getText()
.toString());
values.put(DBHelper.CLIENT_TABLE_EMAIL_FIELD, addet4.getText()
.toString());
values.put(DBHelper.CLIENT_TABLE_ADDRESS_FIELD, addet5
.getText().toString()); db.update(DBHelper.CLIENT_TABLE_NAME, values,
"_id=" + selectId, null); finish();
}
});
button2.setOnClickListener(new OnClickListener() { public void onClick(View v) {
// TODO Auto-generated method stub
finish();
}
}); }}
总是报**这行空指针  为什么啊  ??