intent数据传递问题

来源:互联网 发布:淘宝退货太多 编辑:程序博客网 时间:2024/05/16 14:59
 

 Intent intent=new Intent(Test1.this,NewActivity.class);
            
             intent.putExtra("photo",(byte[]) maplist.get(location).get("photo"));
             startActivity(intent);
             System.out.println(" maplist.get(location)."+ maplist.get(location).get("photo"));
        dismissPopueWindow();

我打印出来的都是字节数组,但是一跳转就提示我空指针

我一看是byte【】 这个为空,所以我在这里强制转换了一下,就OK了

原创粉丝点击