我使用Facebook Unity SDK 6.1在Facebook上提交我的分数,我已经可以这样做了,但是当我尝试登录时有一个错误:我按下登录按钮,本地Facebook应用程序打开询问我的权限,我按好,当它返回到我的应用程序时,我的应用程序只是崩溃。当我再次打开它时,我已经登录,一切正常。我已经试图解决这个问题好几个星期,但我无法摆脱它。最糟糕的是它只发生在一些设备中。
以下是日志:
E/dalvikvm(17369): Could not find class 'android.app.Notification$Builder', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorNotification
W/dalvikvm(17369): VFY: unable to resolve new-instance 40 (Landroid/app/Notification$Builder;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
D/dalvikvm(17369): VFY: replacing opcode 0x22 at 0x0030
D/dalvikvm(17369): VFY: dead code 0x0032-0077 in Lcom/google/android/gms/common/GooglePlayServicesUtil;.showErrorNotification (ILandroid/content/Context;)V
W/InputManagerService( 1751): Got RemoteException sending setActive(false) notification to pid 17306 uid 10138
I/ActivityManager( 1751): Displayed com.FoxyGames.FoxyFox/com.facebook.unity.FBUnityLoginActivity: +11s188ms (total +11s305ms)
I/ActivityManager( 1751): Displayed com.FoxyGames.FoxyFox/com.unity3d.player.UnityPlayerNativeActivity: +11s215ms
D/AndroidRuntime(17369): Shutting down VM
W/dalvikvm(17369): threadid=1: thread exiting with uncaught exception (group=0x4001d578)
E/AndroidRuntime(17369): FATAL EXCEPTION: main
E/AndroidRuntime(17369): java.lang.Error: FATAL EXCEPTION [main]
E/AndroidRuntime(17369): Unity version : 4.5.5f1
E/AndroidRuntime(17369): Device model : Sony Ericsson ST25i
E/AndroidRuntime(17369): Device fingerprint: SEMC/ST25i_1261-7887/ST25i:2.3.7/6.0.B.3.184/R7P_zw:user/release-keys
E/AndroidRuntime(17369):
E/AndroidRuntime(17369): Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=64206, result=-1, data=Intent { (has extras) }} to activity {com.FoxyGames.FoxyFox/com.facebook.unity.FBUnityLoginActivity}: java.lang.NullPointerException
E/AndroidRuntime(17369): at android.app.ActivityThread.deliverResults(ActivityThread.java:2553)
E/AndroidRuntime(17369): at android.app.ActivityThread.handleSendResult(ActivityThread.java:2595)
E/AndroidRuntime(17369): at android.app.ActivityThread.access$2000(ActivityThread.java:121)
E/AndroidRuntime(17369): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
E/AndroidRuntime(17369): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(17369): at android.os.Looper.loop(Looper.java:138)
E/AndroidRuntime(17369): at android.app.ActivityThread.main(ActivityThread.java:3701)
E/AndroidRuntime(17369): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(17369): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(17369): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
E/AndroidRuntime(17369): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
E/AndroidRuntime(17369): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(17369): Caused by: java.lang.NullPointerException
E/AndroidRuntime(17369): at com.facebook.unity.FBLogin.onActivityResult(FBLogin.java:245)
E/AndroidRuntime(17369): at com.facebook.unity.FBUnityLoginActivity.onActivityResult(FBUnityLoginActivity.java:25)
E/AndroidRuntime(17369): at android.app.Activity.dispatchActivityResult(Activity.java:3908)
E/AndroidRuntime(17369): at android.app.ActivityThread.deliverResults(ActivityThread.java:2549)
E/AndroidRuntime(17369): ... 11 more
W/ActivityManager( 1751): Force finishing activity com.FoxyGames.FoxyFox/com.facebook.unity.FBUnityLoginActivity
W/ActivityManager( 1751): Activity pause timeout for HistoryRecord{40c25ed8 com.FoxyGames.FoxyFox/com.facebook.unity.FBUnityLoginActivity}
W/InputConnectionWrapper.ICC( 1880): Timed out waiting on IInputContextCallback
D/CustomizationProvider( 1833): openFile -- START uri=content://com.sonyericsson.provider.customization/settings/com.sonyericsson.textinput.uxp
I/CustomizationProvider( 1833): No configuration file: /system/etc/customization/settings/com/sonyericsson/textinput/uxp/custom_settings.xml
W/kernel ( 1487): [52845.270385] prcmu_kick_a9wdog: kicking ID 0
W/InputConnectionWrapper.ICC( 1880): Timed out waiting on IInputContextCallback
我认为这是重要的一句话:
Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=64206, result=-1, data=Intent { (has extras) }} to activity {com.FoxyGames.FoxyFox/com.facebook.unity.FBUnityLoginActivity}: java.lang.NullPointerException**
我该如何解决这个问题?