发布应用程序后改造空响应

时间:2021-02-15 09:51:22

标签: android retrofit2

当我从 android studio 安装应用程序时。该应用程序运行良好。但发布应用后,它无法正常工作。

这里我正在做的是:- 在 android studio 安装时,我点击了一个登录 API,并在响应服务器中发送了一个用于用户登录的令牌。我成功地获得了这个令牌。但是,当我在 google play 商店上发布应用程序并且用户尝试登录时,我在服务器的响应中收到令牌“null”。并且响应代码是 200 ok。

<块引用>

在邮递员上一切正常,在 Apple 应用上也一样。

这是我的第一个项目。请帮助我,我现在已经厌倦了。 你们能告诉我为什么会这样吗?

Here is a response screenshot of user login on the published app

<块引用>

这是我的模型类,键或变量名称 100% 正常。

    public class LoginRegistrationModel {

    @SerializedName("success")
    @Expose
    private String success;

    @SerializedName("firstname")
    @Expose
    private String firstname;

    @SerializedName("lastname")
    @Expose
    private String lastname;

    @SerializedName("profile_image")
    @Expose
    private String profile_image;

    @SerializedName("id")
    @Expose
    private int id;

    public void setSuccess(String success) {
        this.success = success;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public void setProfile_image(String profile_image) {
        this.profile_image = profile_image;
    }

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

    public int getId() {
        return id;
    }

    public String getSuccess() {
        return success;
    }

    public String getProfile_image() {
        return profile_image;
    }

    public String getFirstname() {
        return firstname;
    }

    public String getLastname() {
        return lastname;
    }

}

0 个答案:

没有答案