androidparse-platformandroid-parserback4app

How to change url in parse.com android?


Hi As parse beeen officially going to close, I am using an alternative as back4app. So in back4app, documentation says

Use this code and change url instead of https://api.parse.com

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

But I couldn't use the above line, as it throws compile error as

com.parse.Pars.Builder Configuration has private access in com.parse.Parse.Configuration in the first line of initialize method.

Then How to change and apply it.


Solution

  • I think you are using 1.12.0 or 1.13.0 correctly. The sdk version is ok, only these 2 version contain Parse.Configuration.

    The error says you have called the constructor of "Parse.Configuration", and this constructor is a private method.

    You should call build() to get the Parse.Configuration instance. See have you use build() in your code.

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