0
我正在使用這個簡單的Android代碼,並獲取「myBundle」的空異常: 「myBundle.putstring ....」。 謝謝你的幫助。將字符串添加到內部包輸出空異常
public class SomeActivity extends Activity{
Bundle myBundle;
@override
protected void onCreate(Bundle savedInstanceState){
Button btn = (Button)findViewById(R.id.btn);
btn.setOnClickListener(new View.OnClickListener(){
@override
public void onClick(View v){
myBundle.putstring("someKey","someString");
}
});
}
}