I have been struggling with this issue since yesterday evening and have not been able to find any solution to it over the web. I am developing an app using Android Studio and I want to save some instances to a local file (instances of the class Table
). I have made sure that Table
implements java.io.Serializable
, along with all its components, but I somehow get the following error:
W/System.err: java.io.WriteAbortedException: writing aborted;
java.io.NotSerializableException: com.pewletthackard.waiterfocusapp.struct.Table
Even after declaring most of my fields as transient
, with only 2 Integer
fields left un-transient
, I still manage to get this error message. This is some of my class:
import java.io.Serializable;
public class Table implements Serializable,Comparable<Table> {
private final Integer number;
private Integer peopleCovered;
private transient final AbstractShape shape;
private transient Status status = DefaultStatus.WELCOMED;
private transient Timer timer = new Timer(status);
private transient StatusFlow statusFlow;
...
The rest of the class is just made of constructors and getters/setters. Also, this is not an inner class. Can anyone help me out?