如何在parse.comandroid中更改url?

How to change url in parse.com android?

您好,随着 parse beeen 正式关闭,我正在使用 back4app 作为替代品。所以在 back4app 中,documentation 表示

使用此代码并更改 url 而不是 https://api.parse.com

Parse.initialize(new Parse.Configuration.Builder(myContext)
.applicationId("YOUR_APP_ID")
.clientKey("YOUR_CLIENT_KEY")
.server("https://parseapi.back4app.com") 

但我不能使用上面的行,因为它会抛出编译错误

com.parse.Pars.Builder 配置在初始化方法的第一行 com.parse.Parse.Configuration 中具有私有访问权限。

然后如何更改和应用它。

我认为您正确使用了 1.12.0 或 1.13.0。 sdk版本没问题,只有这2个版本包含Parse.Configuration。

报错说你调用了"Parse.Configuration"的构造函数,这个构造函数是私有方法。

您应该调用 build() 来获取 Parse.Configuration 实例。查看您是否在代码中使用了 build()。

Parse.initialize(new Parse.Configuration.Builder(myContext)
    .applicationId("YOUR_APP_ID")
    .clientKey(null)
    .server("http://localhost:1337/parse/") 
    .build()
);