I am using Realm for local storage in Android. I get the following response form server.
[{ "ListId": 10, "Names": ["Name1", "Name2", "Name3", "Name4"] }]
Here is my model
public class Model extends RealmObject { private int ListId; private RealmList<String> Names = new RealmList<String>() public int getListId() { return ListId; } public void setListId(int listId) { ListId = listId; } public RealmList<String> getNames() { return Names; } public void setNames(RealmList<String> names) { Names = names; } }
And I get it for ArrayList
A parameter of type "java.lang.String" is not within its bounds; should extend 'io.realm.RealmObject'.
Thanks.
android realm
user2566484
source share