Error : android.app.SuperNotCalledException

后端 未结 5 1616
野的像风
野的像风 2021-02-08 05:10

i am new user of android and i had make one android database connection and create table application but at run time it will generate an error.
an error is hear :

5条回答
  •  隐瞒了意图╮
    2021-02-08 05:55

    I found a solution for my situation, where I wanted to have the tab bars animate away before allowing the onDestroy() to continue. SuperNotCalledException will be thrown only if the inaccessible mCalled field is not set by super.onDestroy(), but digging in the source revealed that the public method super.onDestroyView() ONLY sets this field -- so I did the following to allow actual super.onDestroy() to be called in an endAction (am using RetroLambda) :

    @Override
    public void onDestroy() {
        super.onDestroyView();  //Calling this public method will prevent the android.support.v4.app.SuperNotCalledException when we don't immediately call the super.onDestroy - since it is in an endAction
        removeHeaderView(super::onDestroy);
    }
    

    Hope this helps someone else!

提交回复
热议问题