java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.kasimir.schulplaner/com.example.kasimir.schulplaner.MainActivity}: java.lang.RuntimeException: com.example.kasimir.schulplaner.MainActivity@753f53 must implement OnFragmentInteractionListener

Stack Overflow | Conwear | 5 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    App crashes when replacing Fragments

    Stack Overflow | 5 months ago | Conwear
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.kasimir.schulplaner/com.example.kasimir.schulplaner.MainActivity}: java.lang.RuntimeException: com.example.kasimir.schulplaner.MainActivity@753f53 must implement OnFragmentInteractionListener

    Root Cause Analysis

    1. java.lang.RuntimeException

      com.example.kasimir.schulplaner.MainActivity@753f53 must implement OnFragmentInteractionListener

      at com.example.kasimir.schulplaner.MainFragment.onAttach()
    2. com.example.kasimir
      MainFragment.onAttach
      1. com.example.kasimir.schulplaner.MainFragment.onAttach(MainFragment.java:84)
      1 frame
    3. Android Support v4
      FragmentActivity.onStart
      1. android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1043)
      2. android.support.v4.app.BackStackRecord.setLastIn(BackStackRecord.java:838)
      3. android.support.v4.app.BackStackRecord.calculateFragments(BackStackRecord.java:878)
      4. android.support.v4.app.BackStackRecord.run(BackStackRecord.java:719)
      5. android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1677)
      6. android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
      7. android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:604)
      7 frames
    4. Android v7
      AppCompatActivity.onStart
      1. android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
      1 frame
    5. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1277)
      2. android.app.Activity.performStart(Activity.java:6321)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2419)
      3 frames