我使用 Facebook SDK(和 Twitter、Linkedin)登录我的应用程序。如果我指定 minSdkVersion<10,它会完美运行。我需要升级应用程序才能使用 Fragment..
<uses-sdk android:minSdkVersion="10" />
对于 11 及更高版本,应用程序在收到令牌后崩溃!我需要帮助!看一下错误:
更新
07-12 16:58:44.136: D/AndroidRuntime(18310): Shutting down VM
07-12 16:58:44.148: E/AndroidRuntime(18310): FATAL EXCEPTION: main
07-12 16:58:44.148: E/AndroidRuntime(18310): java.lang.NullPointerException: println needs a message
07-12 16:58:44.148: E/AndroidRuntime(18310): at android.util.Log.println_native(Native Method)
07-12 16:58:44.148: E/AndroidRuntime(18310): at android.util.Log.d(Log.java:138)
07-12 16:58:44.148: E/AndroidRuntime(18310): at com.branchu1.Login$1$1.onComplete(Login.java:161)
07-12 16:58:44.148: E/AndroidRuntime(18310): at com.facebook.android.Facebook$1.onComplete(Facebook.java:312)
07-12 16:58:44.148: E/AndroidRuntime(18310): at com.facebook.android.FbDialog$FbWebViewClient.shouldOverrideUrlLoading(FbDialog.java:144)
07-12 16:58:44.148: E/AndroidRuntime(18310): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:224)
07-12 16:58:44.148: E/AndroidRuntime(18310): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:324)
07-12 16:58:44.148: E/AndroidRuntime(18310): at android.os.Handler.dispatchMessage(Handler.java:99)
07-12 16:58:44.148: E/AndroidRuntime(18310): at android.os.Looper.loop(Looper.java:137)
07-12 16:58:44.148: E/AndroidRuntime(18310): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-12 16:58:44.148: E/AndroidRuntime(18310): at java.lang.reflect.Method.invokeNative(Native Method)
07-12 16:58:44.148: E/AndroidRuntime(18310): at java.lang.reflect.Method.invoke(Method.java:511)
07-12 16:58:44.148: E/AndroidRuntime(18310): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-12 16:58:44.148: E/AndroidRuntime(18310): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-12 16:58:44.148: E/AndroidRuntime(18310): at dalvik.system.NativeStart.main(Native Method)
Twitter 和 Linkedin SDK 也是如此。如果我从清单中删除字段 android:minSdkVersion,它就可以工作。我真的不明白!
谢谢!