android.app.SuperNotCalledException: Activity did not call through to super.onStop()

后端 未结 2 610
挽巷
挽巷 2021-01-03 23:48

Im using a few sensors - MediaRecorder and MediaPlayer, NotificationManager, a WakeLock, and LocationListener...

Here is my onResume() and onPause() functions:

相关标签:
2条回答
  • 2021-01-03 23:59

    You need to make sure that you have super.onStop and super.onDestroy in your overridden methods. This could be a good candidate for the problem you have:

    @Override
    protected void onStop() {
        Log.w(TAG, "App stopped");
    
        super.onStop();
    }
    
    @Override
    protected void onDestroy() {
        Log.w(TAG, "App destroyed");
    
        super.onDestroy();
    }
    
    0 讨论(0)
  • 2021-01-04 00:11

    Stopped throwing exeptions after adding empty onPause and onResume events(I've added your methods anyways, just to be safe).

    Altough, the second activity still halts for seemingly no reason. But I'll make an another question about that.

    0 讨论(0)
提交回复
热议问题