Given a custom class org.example.app.MyClass implements Parcelable
, I want to write a List<MyClass>
to a Parcel. I did the marshalling with
List<MyClass> myclassList = ...
parcel.writeList(myclassList);
whenever I try to unmarshall the class with
List<MyClass> myclassList = new ArrayList<MyClass>();
parcel.readList(myclassList, null);
there is an "BadParcelableException: ClassNotFoundException when unmarshalling org.example.app.MyClass"
exception.
What is wrong here? Why is the class not found?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…