chendongMarch/SocialSdkLibrary

运行Demo直接报错,请教一下

zhitops opened this issue · 0 comments

日志如下:

2020-05-09 15:57:35.901 23557-23557/com.babypat W/System.err: java.lang.NoSuchFieldException: No field mActivityList in class Landroid/app/ActivityThread; (declaration of 'android.app.ActivityThread' appears in /system/framework/framework.jar)
2020-05-09 15:57:35.901 23557-23557/com.babypat W/System.err:     at java.lang.Class.getDeclaredField(Native Method)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at com.zfy.social.core._SocialSdk$ActivityLifecycleImpl.getTopActivity(_SocialSdk.java:245)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at com.zfy.social.core._SocialSdk.getTopActivity(_SocialSdk.java:150)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at com.zfy.social.core.manager.LoginManager.login(LoginManager.java:65)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at com.zfy.social.core.manager.LoginManager.login(LoginManager.java:44)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at com.babypat.TestActivity.clickBtn(TestActivity.java:312)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at com.babypat.TestActivity_ViewBinding$2.doClick(TestActivity_ViewBinding.java:83)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at android.view.View.performClick(View.java:7352)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at android.widget.TextView.performClick(TextView.java:14230)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at android.view.View.performClickInternal(View.java:7318)
2020-05-09 15:57:35.902 23557-23557/com.babypat W/System.err:     at android.view.View.access$3200(View.java:846)
2020-05-09 15:57:35.903 23557-23557/com.babypat W/System.err:     at android.view.View$PerformClick.run(View.java:27800)
2020-05-09 15:57:35.903 23557-23557/com.babypat W/System.err:     at android.os.Handler.handleCallback(Handler.java:873)
2020-05-09 15:57:35.903 23557-23557/com.babypat W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:99)
2020-05-09 15:57:35.903 23557-23557/com.babypat W/System.err:     at android.os.Looper.loop(Looper.java:214)
2020-05-09 15:57:35.903 23557-23557/com.babypat W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:7050)
2020-05-09 15:57:35.903 23557-23557/com.babypat W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
2020-05-09 15:57:35.903 23557-23557/com.babypat W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
2020-05-09 15:57:35.903 23557-23557/com.babypat W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
2020-05-09 15:57:35.904 23557-23557/com.babypat D/AndroidRuntime: Shutting down VM
2020-05-09 15:57:35.906 23557-23557/com.babypat E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.babypat, PID: 23557
    java.lang.IllegalStateException: 无法获取 Activity
        at com.zfy.social.core._SocialSdk.getTopActivity(_SocialSdk.java:153)
        at com.zfy.social.core.manager.LoginManager.login(LoginManager.java:65)
        at com.zfy.social.core.manager.LoginManager.login(LoginManager.java:44)
        at com.babypat.TestActivity.clickBtn(TestActivity.java:312)
        at com.babypat.TestActivity_ViewBinding$2.doClick(TestActivity_ViewBinding.java:83)
        at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22)
        at android.view.View.performClick(View.java:7352)
        at android.widget.TextView.performClick(TextView.java:14230)
        at android.view.View.performClickInternal(View.java:7318)
        at android.view.View.access$3200(View.java:846)
        at android.view.View$PerformClick.run(View.java:27800)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7050)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)