我有Facebook登录它工作正常,但有些我如何得到一些用户的以下崩溃。我不是要求任何额外的权限:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object com.facebook.inject.Lazy.get()' on a null object reference
at android.os.Parcel.readException(Parcel.java:1552)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
at android.content.ContentResolver.query(ContentResolver.java:485)
at android.content.ContentResolver.query(ContentResolver.java:429)
at com.facebook.internal.NativeProtocol.fetchAllAvailableProtocolVersionsForAppInfo(SourceFile:790)
at com.facebook.internal.NativeProtocol.access$000(SourceFile:49)
at com.facebook.internal.NativeProtocol$NativeAppInfo.getPackage(SourceFile:281)
at com.facebook.internal.NativeProtocol$NativeAppInfo.getPackage(SourceFile:226)
at com.facebook.internal.NativeProtocol$1.run(SourceFile:763)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
我的代码
LoginManager.getInstance().registerCallback(callbackManager,
new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(final LoginResult loginResult) {
Bundle parameters = new Bundle();
parameters.putString("fields", "id,name,email");
GraphRequest request = GraphRequest.newMeRequest(
loginResult.getAccessToken(), new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject me, GraphResponse response) {
});
request.setParameters(parameters);
request.executeAsync();
}
@Override
public void onCancel() {
}
@Override
public void onError(FacebookException exception) {
}
});
为什么这个错误不会一直到来,如果我们在android中使用porductflaovers,我们有任何额外的步骤