您好,在我的项目中,我使用解析来存储用户登录信息,当我尝试集成Facebook登录信息时,我在此行的Application类中收到错误
ParseFacebookUtils.initialize(MyApplication.this);
,错误是......
java.lang.AbstractMethodError: abstract method "boolean com.parse.ParseAuthenticationProvider.restoreAuthentication(org.json.JSONObject)"
at com.parse.ParseUser.synchronizeAuthData(ParseUser.java:1472)
at com.parse.ParseUser.registerAuthenticationProvider(ParseUser.java:1525)
at com.parse.ParseFacebookUtils.initialize(ParseFacebookUtils.java:95)
at com.parse.ParseFacebookUtils.initialize(ParseFacebookUtils.java:79)
at com.sanafoundation.sanjaym.app.MyApplication.onCreate(MyApplication.java:44)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1034)
我的Application类是
public class MyApplication extends Application {
private static MyApplication mInstance;
@Override
public void onCreate() {
super.onCreate();
mInstance = this;
// register with parse
ParseUtils.registerParse(this);
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
// If you would like all objects to be private by default, remove this line.
defaultACL.setPublicReadAccess(true);
ParseACL.setDefaultACL(defaultACL, true);
Firebase.setAndroidContext(this);
FacebookSdk.sdkInitialize(getApplicationContext());
Parse.initialize(this,
AppConfig.PARSE_APPLICATION_ID,
AppConfig.PARSE_CLIENT_KEY
);
ParseFacebookUtils.initialize(MyApplication.this);
}
public static synchronized MyApplication getInstance() {
return mInstance;
}
}
我也尝试在build.gradle文件中添加库路径,但它不起作用。有人能帮助我吗?