I have class A, that extends class B, that implements Serializable.
When i try to transform it in a JSON, using GSON lib, it says that "class declares multiple JSON fields named serialVersionUid".
As long as i know, if i don't explicit declare serialVersionUid, it is generated by GSON.
I also tried to put serialVersionUid statically, but doesn't work.
I can fix the error by implementing Serialization in class A, but i have many classes that extends B, and i don't think exclude B from them will be a good ideia...
Does anyone know why this error occurs?
Class A extends B {
private c;
private d;
private e;
}
Class B extends Serializable{
private f;
private g;
}