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 8641515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:32:44+00:00 2026-06-12T11:32:44+00:00

Possible Duplicate: Crash on ListView.removeFooterView(View) How is it possible to get a null pointer

  • 0

Possible Duplicate:
Crash on ListView.removeFooterView(View)

How is it possible to get a null pointer exception when removing an footerview? I checked that both the footerview and listview are not null before calling

myListView.removeFooterView(mFooterView)

This listview does have a multi-list adapter. I also checked the parent of every footer that could have been added and the parent of each one was null.

BTW, where on earth is the getAllFooterViews? hasFooterView(footerView)? methods in the SDK.

PS. I don’t think a well written API should ever hide such information.

  FATAL EXCEPTION:  main
  java.lang.NullPointerException
  at android.widget.ListView.removeFooterView(ListView.java:461)
  at com.mypackage.MyActivity.clearAllFooters()

It does not seem to matter which footer. Its really anything I try to remove at this point, any of the four footers that might have been added.

A bit of context, the ListView is not currently visible, does have focus, and the footer is being cleared after the return of an Async call. I have three listviews on the same MyActivity, and this ListView is not currently visible, it does not have the focus, but still a null pointer exception?

I am compiling 4.03 and deploying on android sdk 2.2

I am also checking that footer count is greater than 0.

  • 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-12T11:32:45+00:00Added an answer on June 12, 2026 at 11:32 am

    It could be the version of your Android API. This is described very well here: Crash on ListView.removeFooterView(View)

    It looks like the Android team may have forgotten to check for NULL in their API. You may be able to fix this in your custome Adapter class.

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

Sidebar

Related Questions

Possible Duplicate: C/C++ Char Pointer Crash char *p = atl; char c; c =
Possible Duplicate: presentViewController: crash on iOS 6 (AutoLayout) I'm getting this error when clicking
Possible Duplicate: After a computer crash my Visual Studio 2010 will not load an
Possible Duplicate: PHP get all arguments as array? Within a javascript function arguments always
Possible Duplicate: Unable to get a list of installed Python modules How do I
Possible Duplicate: Proper way to exit iPhone application? How can I Crash my app?
Possible Duplicate: App crash on 4.0 but not on 5.0 In My iPhone App
Possible Duplicate: Serializable crash error when loading web broser from my application below a
Possible Duplicate: how to rename a project without killing solution I know that this
Possible Duplicate: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive Firstly, let me

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.