在外部类中
Intent intent = new Intent();
Bundle bundle = new Bundle();
bundle.putString("key1", "aaaaaaa");
intent.putExtras(bundle);
然后在mactivity里面
Bundle bundle = this.getIntent().getExtras();
String s = bundle.getString("key1");
System.out.println(s);
看了网上的例子我以为这样可以打印出字符串aaaaaaa 结果程序运行崩溃,String s = bundle.getString("key1");这一行代码报错空指针,请问要怎么改正这个问题