Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 353
Shadow Avatar asked May 13 '26 23:05

Shadow


1 Answers

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()
);
like image 179
ChunTingLin Avatar answered May 15 '26 14:05

ChunTingLin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!