Parcel: unable to marshal value
2016-09-23 19:54
1151 查看
额,今天,发现群里有为大胸弟,一直在问这个问题。
在两个activity直接传递List时,出现Parcel: unable to marshal value异常。讲
道理,当时我也不知道是什么原因,不过想了一下,找了资料,应该发现是酱紫的。
在MainActivity页面(MainActivity页面向NextActivity页面传递一个List):
Intent intent = new Intent(this, NextActivity.class); intent.putExtra("list", list); startActivity(intent);
但需要注意:
1. xxInfo要implements Serializable或者继承Parcelable,我的程序是implements Serializable。 2. list必须是ArrayList(若是List会提示错误)。 3. MainActivity中,intent.putExtra("list", Arraylist实例)。 4. NextActivity中,List<xxInfo> infoList = (ArrayList)getIntent().getSerializableExtra("list");
嘻嘻,好像解决了。
相关文章推荐
- Parcel: unable to marshal value
- Parcel: unable to marshal value或Parcel: unable to marshal value null 问题
- android ---java.lang.RuntimeException: Parcel: unable to marshal value
- Android 解决Parcel: unable to marshal value bug
- 在fragment 传递数据的时候报:Parcel: unable to marshal value
- Parcel: unable to marshal value
- java.lang.RuntimeException: Parcel: unable to marshal value
- Parcel: unable to marshal value
- Parcel: unable to marshal value {CLASSNAME}
- Parcel: unable to marshal value
- java.lang.RuntimeException: Parcel: unable to marshal value
- java.lang.RuntimeException: Parcel: unable to marshal value
- java.lang.RuntimeExceptionL:Parcel: unable to marshal val xxx类i
- org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge问题原因
- unable to convert mysql date/time value to system.data.time 11/14
- Unable to convert string form to class javax.el.ValueExpression的一种解决方案
- Unable to convert MySQL date/time value to System.DateTime
- 使用bindValue出错,lastError提示QMYSQL3: Unable to bind value .
- Unable to convert MySQL date/time value to System.DateTime 错误
- mysql c# Unable to convert MySQL date/time value to System.DateTime 错误