App尝试登录facebook android时崩溃了

时间:2014-05-29 08:04:05

标签: android facebook

我不知道为什么我的应用程序在点击facebook登录按钮时崩溃了NPE。我添加并检查了所有必需的库文件。但它仍然崩溃。请帮助我。

我的LogCat

05-29 13:28:58.770: E/AndroidRuntime(4161): FATAL EXCEPTION: main
05-29 13:28:58.770: E/AndroidRuntime(4161): java.lang.NullPointerException
05-29 13:28:58.770: E/AndroidRuntime(4161):     at android.support.v4.content.LocalBroadcastManager.<init>(LocalBroadcastManager.java:110)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at android.support.v4.content.LocalBroadcastManager.getInstance(LocalBroadcastManager.java:102)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at com.facebook.Session.postActiveSessionAction(Session.java:1574)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at com.facebook.Session.setActiveSession(Session.java:971)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at com.facebook.Session.openActiveSession(Session.java:1126)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at com.facebook.Session.openActiveSession(Session.java:1035)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at com.trimex.amadora.FlipperRegister.intialiseFBLogin(FlipperRegister.java:398)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at com.trimex.amadora.FlipperRegister.onClick(FlipperRegister.java:292)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at android.view.View.performClick(View.java:4475)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at android.view.View$PerformClick.run(View.java:18786)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at android.os.Handler.handleCallback(Handler.java:730)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at android.os.Handler.dispatchMessage(Handler.java:92)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at android.os.Looper.loop(Looper.java:137)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at android.app.ActivityThread.main(ActivityThread.java:5454)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at java.lang.reflect.Method.invokeNative(Native Method)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at java.lang.reflect.Method.invoke(Method.java:525)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
05-29 13:28:58.770: E/AndroidRuntime(4161):     at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:0)

所以你有广播时广播,接收者听。

但是,如果你想要回复这个广播的东西在广播的那一天就在课程上是空的。

因此,如果在调用之前将其实例化,请检查您定义侦听器的活动或片段。