Firebase with Realm. De-serializing POJO class
<p>I have data in my firebase DB, everything works fine until I try to De-serialize the data.</p>

<p>Error: <strong>argument 1 has type io.realm.RealmList, got java.util.ArrayList</strong></p>

<p>Here's my code:</p>

<pre><code> DatabaseReference root = FirebaseDatabase.getInstance().
                getReferenceFromUrl("https://swing-8792d.firebaseio.com/playlist");
        Query playlistQuery = root.orderByKey().equalTo(key);
        playlistQuery.addListenerForSingleValueEvent(new ValueEventListener() {
            @Override
            public void onDataChange(DataSnapshot dataSnapshot) {
                for (DataSnapshot child : dataSnapshot.getChildren()) {

                    Log.d("Child", child + "");

                    Playlist receivedPlaylist = child.getValue(Playlist.class);
                    Playlist playlist = new Playlist();

                    playlist.setCreatedBy(receivedPlaylist.getCreatedBy());
                    playlist.setName(receivedPlaylist.getName());
                    playlist.setMyMap(receivedPlaylist.getMyMap());
                    playlist.setQrKey(receivedPlaylist.getQrKey());
                    playlist.setCount(receivedPlaylist.getCount());
                    playlist.setId(receivedPlaylist.getId());
                    playlist.setTracks(receivedPlaylist.getTracks());
                    mPlaylist.add(playlist);
 }
</code></pre>

<p>This is my POJO class:</p>

<pre><code>@RealmClass
public class Playlist extends RealmObject {

String name;
Long id;
RealmList&lt;Track&gt; tracks;
Integer count;
String createdBy;
RealmList&lt;UserMap&gt; myMap;
String qrKey;

public RealmList&lt;UserMap&gt; getMyMap() {
    return myMap;
}

public void setMyMap(RealmList&lt;UserMap&gt; myMap) {
    this.myMap = myMap;
}

public Playlist(){}



public String getQrKey() {
    return qrKey;
}

public void setQrKey(String qrKey) {
    this.qrKey = qrKey;
}

public String getCreatedBy() {
    return createdBy;
}

public void setCreatedBy(String createdBy) {
    this.createdBy = createdBy;
}


public RealmList&lt;Track&gt; getTracks() {
    return tracks;
}

public void setTracks(RealmList&lt;Track&gt; tracks) {
    this.tracks = tracks;
}

public String getName() {
    return name;
}

public void setName(String name) {
    this.name = name;
}

public Long getId() {
    return id;
}

public void setId(Long id) {
    this.id = id;
}

public Integer getCount() {
    return count;
}

public void setCount(Integer count) {
    this.count = count;
}
</code></pre>

<p>}</p>

<p>If I try to de-serialize with Normal POJO class (i.e Removing Realm) it works fine.</p>