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

  • Home
  • SEARCH
  • 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 8744465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:50:41+00:00 2026-06-13T11:50:41+00:00

I am developing an application with rest web service. By getting the json response

  • 0

I am developing an application with rest web service. By getting the json response from server, am parsing it and populating it in a custom list view using adapter. In that json response there are url’s to download image to display in list items. Every thing has been done and working fine, except loading image from url there is Nullpointer exception.
I have done debugging also, logcat shows as follows

    java.lang.NullPointerException
    at android.widget.AbsListView.obtainView(AbsListView.java:2269)
    at android.widget.ListView.measureHeightOfChildren(ListView.java:1244)
    at android.widget.ListView.onMeasure(ListView.java:1156)
    at android.view.View.measure(View.java:15172)
    at android.widget.RelativeLayout.measureChild(RelativeLayout.java:602)
    at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:415)
    at android.view.View.measure(View.java:15172)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4814)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    at android.view.View.measure(View.java:15172)
    at android.widget.LinearLayout.measureVertical(LinearLayout.java:833)
    at android.widget.LinearLayout.onMeasure(LinearLayout.java:574)
    at android.view.View.measure(View.java:15172)
    at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4814)
    at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2
    at android.view.View.measure(View.java:15172)
    at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1848)
    at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1100)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1273)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
    at android.view.Choreographer.doCallbacks(Choreographer.java:555)
    at android.view.Choreographer.doFrame(Choreographer.java:525)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
    at android.os.Handler.handleCallback(Handler.java:615)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4745)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    at dalvik.system.NativeStart.main(Native Method)
    Force finishing activity com.shopping/.views.JsonListView

Can some one help me to find the reason why getting this exception.

Edit:

     int loader = R.drawable.fb_icon;
 // ImageLoader class instance
 ImageLoader imgLoader = new ImageLoader(_Context);


 imgLoader.DisplayImage(imageUrl, loader, holder.productImage);
     public void DisplayImage(String url, int loader, ImageView imageView)
     {  
        stub_id = loader;
        imageViews.put(imageView, url);
        Bitmap bitmap=memoryCache.get(url);
        if(bitmap!=null)
           imageView.setImageBitmap(bitmap);
        else
        {
            queuePhoto(url, imageView);
            imageView.setImageResource(loader);
        }
      }
  • 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-13T11:50:42+00:00Added an answer on June 13, 2026 at 11:50 am

    Write below line into your adapter’s getview() method.

    imageLoader.DisplayImage(url[position], imageview1);
    

    and see below lazy loading link for more information and if you have any query regarding that then tell me.

    Lazy Loading Listview

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

Sidebar

Related Questions

I'm developing an Android application which sends content to a server using rest web
I am developing an application with REST full web service .Now i have some
I'm developing a web application with jax-rs, i made a rest client with jquery.
We are developing a REST based application using Visual Studio 2010, using asp.net web
I'm developing an Java Web Application, I used some jQuery and a REST web
I'm developing an application which use HTTP REST API .I'm load response to string
I'm developing an application, that makes use of some REST web services. It's technical
I'm going to be developing a REST-ful Web Service for a new public website.
We are currently developing a web application meant to run in Linux/Unix web server
The background I'm developing a REST API for a C#.NET web application using WCF.

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.