java.lang.RuntimeException

Unable to start activity ComponentInfo{com.afwsamples.testdpc/com.afwsamples.testdpc.PolicyManagementActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.preference.Preference.setOnPreferenceChangeListener(android.support.v7.preference.Preference$OnPreferenceChangeListener)' on a null object reference

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web45833

  • via GitHub by guanhuay
    , 9 months ago
    Unable to start activity ComponentInfo{com.afwsamples.testdpc/com.afwsamples.testdpc.PolicyManagementActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.preference.Preference.setOnPreferenceChangeListener(android.support.v7.preference.Preference$OnPreferenceChangeListener)' on a null object reference
  • via GitHub by gubatron
    , 5 months ago
    Unable to start activity ComponentInfo{com.frostwire.android/com.frostwire.android.gui.activities.SettingsActivity2}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.preference.SwitchPreferenceCompat.setOnPreferenceChangeListener(android.support.v7.preference.Preference$OnPreferenceChangeListener)' on a null object reference
  • Unable to start activity ComponentInfo{com.android.frutii.fitness5/com.android.frutii.fitness5.ActivityHome}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
  • Stack trace

    • java.lang.RuntimeException: Unable to start activity ComponentInfo{com.afwsamples.testdpc/com.afwsamples.testdpc.PolicyManagementActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.preference.Preference.setOnPreferenceChangeListener(android.support.v7.preference.Preference$OnPreferenceChangeListener)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    2 times, 4 months ago
    Unknown user
    Once, 5 months ago
    16 times, 6 months ago
    6 times, 9 months ago
    12 times, 10 months ago
    103 more bugmates