java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yuehu.cola.projectcola/com.yuehu.cola.projectcola.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference

GitHub | kncxstudio | 5 months ago
  1. 0

    是不是不能在Fragment中使用setMore和setNoMore方法?

    GitHub | 5 months ago | kncxstudio
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yuehu.cola.projectcola/com.yuehu.cola.projectcola.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
  2. 0

    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference

    GitHub | 1 year ago | banobi
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
  3. 0

    java.lang.NullPointerException

    GitHub | 2 years ago | e-yes
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  1. maxxi 1 times, last 1 month ago
  2. Nisha Singh 5 times, last 8 months ago
1 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference

    at android.view.ViewConfiguration.get()
  2. Android Platform
    FrameLayout.<init>
    1. android.view.ViewConfiguration.get(ViewConfiguration.java:359)
    2. android.view.View.<init>(View.java:3587)
    3. android.view.View.<init>(View.java:3682)
    4. android.view.ViewGroup.<init>(ViewGroup.java:497)
    5. android.view.ViewGroup.<init>(ViewGroup.java:493)
    6. android.view.ViewGroup.<init>(ViewGroup.java:489)
    7. android.view.ViewGroup.<init>(ViewGroup.java:485)
    8. android.widget.FrameLayout.<init>(FrameLayout.java:103)
    8 frames
  3. com.jude.easyrecyclerview
    RecyclerArrayAdapter.setMore
    1. com.jude.easyrecyclerview.adapter.RecyclerArrayAdapter.setMore(RecyclerArrayAdapter.java:223)
    1 frame
  4. com.yuehu.cola
    FragmentYuehu.onCreateView
    1. com.yuehu.cola.projectcola.ui.fragments.FragmentYuehu.initViews(FragmentYuehu.java:70)
    2. com.yuehu.cola.projectcola.ui.fragments.FragmentYuehu.onCreateView(FragmentYuehu.java:62)
    2 frames
  5. Android Platform
    ActivityThread.performLaunchActivity
    1. android.app.Fragment.performCreateView(Fragment.java:2053)
    2. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:894)
    3. android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
    4. android.app.BackStackRecord.run(BackStackRecord.java:834)
    5. android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1452)
    6. android.app.Activity.performStart(Activity.java:6005)
    7. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)
    7 frames