fragment里面getActivity为空怎么解决?

报错log

 getCurrentActivity==null

06-25 11:55:15.653 15985-15985/com.turing.turingsdksample I/cao: onCancel OnHttpRequestListenerparse data failed .please check connect network 

06-25 11:55:15.653 15985-15985/com.turing.turingsdksample W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Activity.runOnUiThread(java.lang.Runnable)' on a null object reference

06-25 11:55:15.654 15985-15985/com.turing.turingsdksample W/System.err:     at com.turing.turingsdksample.fragment.AllFragment.operateHttpCallback(AllFragment.java:487)

06-25 11:55:15.654 15985-15985/com.turing.turingsdksample W/System.err:     at com.turing.turingsdksample.fragment.AllFragment.access$1800(AllFragment.java:106)

06-25 11:55:15.654 15985-15985/com.turing.turingsdksample W/System.err:     at com.turing.turingsdksample.fragment.AllFragment$7.onSuccess(AllFragment.java:611)

06-25 11:55:15.654 15985-15985/com.turing.turingsdksample W/System.err:     at com.turing.semantic.SemanticManager$1.onSuccess(SemanticManager.java:102)


圣诞树111
浏览 2179回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java
Android