i made android native app
RetrofitClient.getApiService().getUser().enqueue(new Callback<List<UserModel>>() {
@Override
public void onResponse(Call<List<UserModel>> call, Response<List<UserModel>> response) {
if (response.isSuccessful()) {
// if debug mode everything no error
// but release mode
// response.body() > is not null
// response.body().getSomething() > is null
// error message: throw with null exception
}
}
@Override
public void onFailure(Call<List<UserModel>> call, Throwable t) {
}
});
i have problem like this. when debug mode, everything is good. no error. but only release mode have error. i don't know what i have to do..
The models are as follows:
public class UserModel {
@SerializedName("pages")
@Expose
private int pages;
@SerializedName("posts")
@Expose
private List<PostModelView> posts;
public int getPages() {
return pages;
}
public void setPages(int pages) {
this.pages = pages;
}
public List<PostModelView> getPosts() {
return posts;
}
public void setPosts(List<PostModelView> posts) {
this.posts = posts;
}
}
(also no error when debug mode)