Storing a list of enums in firebase
<p>I have the following code:</p>

<pre><code>public class TestClass {
     public ArrayList&lt;ObjectTypes&gt; list = new ArrayList&lt;&gt;();
     public TestClass(){
        list.add(ObjectTypes.type1);
     }
}

public enum ObjectTypes {
   type1,
   type2,
   type3,
   type4,
}

fb.child("Test").setValue(new TestClass());
</code></pre>

<p>where fb is a DatabaseReference.</p>

<p>When running the code the application crashes and the following error appears:</p>

<blockquote>
  <p>com.google.firebase.database.DatabaseException: No properties to
  serialize found on class
  ObjectTypes</p>
</blockquote>

<p>This problem did not appear in the old Firebase.</p>