Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:58:27+00:00 2026-06-04T04:58:27+00:00

I am getting a NullPointerException when trying to set my ListActivity ‘s item view.

  • 0

I am getting a NullPointerException when trying to set my ListActivity‘s item view. The full stack trace is at the bottom of this post, but I’m not sure how helpful it is. Here is the line that is causing the issue:

 convertView = mInflater.inflate(R.layout.more_group_list_item, null);

Since the exception is providing little information and I don’t know why this line would generate a NullPointerException I do not know where to look to resolve the issue. My only guess is that the layout item cannot be found.

Here is the context:

class MoreJumpListAdapter extends ArrayAdapter<MoreItem> {

    public MoreJumpListAdapter(final Context context) {
        super(context, 0);
    }

    @Override
    public View getView(final int position, View convertView, final ViewGroup parent) {
        MoreJumpActivity.ViewHolder viewHolder;

        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.more_group_list_item, null);
            viewHolder = new MoreJumpActivity.ViewHolder(convertView);
            convertView.setTag(viewHolder);
        } else {
            viewHolder = (MoreJumpActivity.ViewHolder) convertView.getTag();
        }

        viewHolder.populateViews(getItem(position));

        return convertView;
    }

}

and here is the layout xml file contents:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:paddingRight="?android:attr/scrollbarSize"
    android:background="@color/white">
    <ImageView
        android:id="@+id/imageview_displayimage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:padding="5dp" />
    <TextView
        android:id="@+id/tv_displayname"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:layout_centerVertical="true"
        android:paddingLeft="15dp"
        android:layout_toRightOf="@+id/imageview_displayimage" />
</RelativeLayout>

If anyone sees anything helpful in this stack trace I would love to know what it is.

05-17 20:34:22.224: W/dalvikvm(997): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-17 20:34:22.264: E/AndroidRuntime(997): FATAL EXCEPTION: main
05-17 20:34:22.264: E/AndroidRuntime(997): java.lang.NullPointerException
05-17 20:34:22.264: E/AndroidRuntime(997):  at com.MyApp.MoreJumpActivity$MoreJumpListAdapter.getView(MoreJumpActivity.java:103)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.AbsListView.obtainView(AbsListView.java:1430)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.ListView.makeAndAddView(ListView.java:1745)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.ListView.fillDown(ListView.java:670)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.ListView.fillFromTop(ListView.java:727)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.ListView.layoutChildren(ListView.java:1598)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.AbsListView.onLayout(AbsListView.java:1260)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.RelativeLayout.onLayout(RelativeLayout.java:912)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.RelativeLayout.onLayout(RelativeLayout.java:912)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.View.layout(View.java:7175)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.ViewRoot.performTraversals(ViewRoot.java:1140)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.os.Looper.loop(Looper.java:123)
05-17 20:34:22.264: E/AndroidRuntime(997):  at android.app.ActivityThread.main(ActivityThread.java:3683)
05-17 20:34:22.264: E/AndroidRuntime(997):  at java.lang.reflect.Method.invokeNative(Native Method)
05-17 20:34:22.264: E/AndroidRuntime(997):  at java.lang.reflect.Method.invoke(Method.java:507)
05-17 20:34:22.264: E/AndroidRuntime(997):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-17 20:34:22.264: E/AndroidRuntime(997):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-17 20:34:22.264: E/AndroidRuntime(997):  at dalvik.system.NativeStart.main(Native Method)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:58:28+00:00Added an answer on June 4, 2026 at 4:58 am

    If flow doesn’t step into the inflate method, then mInflater must be null, hence the throw.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to Set Location but getting NullPointerException , i have Provided android.permission.ACCESS_COARSE_LOCATION
Im trying to display this listview, but I keep getting a: 07-17 21:14:22.233: ERROR/AndroidRuntime(349):
I'm trying to parse some xml and i'm getting a NullPointerException but i can't
I'm extending JPanel to make a custom drawing panel, but am getting a NullPointerException
I keep getting this java.lang.NullPointerException on the line where mLoginButton's onClickListener is initiated. I
I keep getting NullPointerException trying to deflate or make invisible the ViewStub from my
I'm getting an NullPointerException when i'm trying to get data from my SQLiteDatabase in
Can anyone help me figure out why I'm getting a NullPointerException here? I'm trying
I'm trying to display a different drawable for each day but I'm getting a
I'm trying to code an app that uses the camera. I'm getting a NullPointerException

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.