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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:03:07+00:00 2026-06-18T10:03:07+00:00

This question is about this popular Android library, Universal Image Loader for Android :

  • 0

This question is about this popular Android library, Universal Image Loader for Android: https://github.com/nostra13/Android-Universal-Image-Loader

  1. I made sure WRITE_EXTERNAL_STORAGE is added.
  2. I enabled both memory and disk cache
  3. I used UnlimitedDiscCache for disk cache
  4. I’m building against Android 2.2 SDK. The exception is found when I’m testing the app on a Android 4.1.2 Nexus S device.
  5. For most of my images, the loading is smooth and fine. However, for certain images, I always get the same exception. Below is an example.

Image URL: http://i10.topit.me/l046/10046137034b1c0db0.jpg

Back trace:

01-14 00:24:42.125: 

ERROR/ImageLoader(1671): http://i10.topit.me/l046/10046137034b1c0db0.jpg

java.io.FileNotFoundException: http://i10.topit.me/l046/10046137034b1c0db0.jpg

at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)

at com.nostra13.universalimageloader.core.download.URLConnectionImageDownloader.getStreamFromNetwork(URLConnectionImageDownloader.java:40)

at com.nostra13.universalimageloader.core.download.ImageDownloader.getStream(ImageDownloader.java:27)

at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.saveImageOnDisc(LoadAndDisplayImageTask.java:296)

at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.tryLoadBitmap(LoadAndDisplayImageTask.java:204)

at com.nostra13.universalimageloader.core.LoadAndDisplayImageTask.run(LoadAndDisplayImageTask.java:128)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)

Please help.

  • 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-18T10:03:08+00:00Added an answer on June 18, 2026 at 10:03 am

    Follow up:

    I finally solved my problem without changing one line of server code. What I did is replacing the default URLConnectionImageDownloader with HttpClientImageDownloader

    Code sample:

            HttpParams params = new BasicHttpParams();
            // Turn off stale checking. Our connections break all the time anyway,
            // and it's not worth it to pay the penalty of checking every time.
            HttpConnectionParams.setStaleCheckingEnabled(params, false);
            // Default connection and socket timeout of 10 seconds. Tweak to taste.
            HttpConnectionParams.setConnectionTimeout(params, 10 * 1000);
            HttpConnectionParams.setSoTimeout(params, 10 * 1000);
            HttpConnectionParams.setSocketBufferSize(params, 8192);
    
            // Don't handle redirects -- return them to the caller. Our code
            // often wants to re-POST after a redirect, which we must do ourselves.
            HttpClientParams.setRedirecting(params, false);
            // Set the specified user agent and register standard protocols.
            HttpProtocolParams.setUserAgent(params, "some_randome_user_agent");
            SchemeRegistry schemeRegistry = new SchemeRegistry();
            schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
            schemeRegistry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
    
            ClientConnectionManager manager = new ThreadSafeClientConnManager(params, schemeRegistry);
    
    
            ImageLoaderConfiguration config =
                    new ImageLoaderConfiguration
                            .Builder(MainActivity.sharedMainActivity.getApplicationContext())
                            .defaultDisplayImageOptions(defaultOptions)
                            .discCache(new UnlimitedDiscCache(cacheDir))
                            .threadPoolSize(1)
                            .memoryCache(new WeakMemoryCache())
                            .imageDownloader(new HttpClientImageDownloader(new DefaultHttpClient(manager, params)))
                            .build();
    

    🙂

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

Sidebar

Related Questions

This seems to be a pretty popular question, and one that has about 1,000
In this popular question about why substring takes O(n) in C# , one of
Site I'm talking about is here: https://www.facebook.com/kleenexau/app_295074103899059 If you run it in popular browsers
This question about Timers for windows services got me thinking: Say I have (and
Followed this question about delayed_job and monit Its working on my development machine. But
Note: I originally asked this question about an hour ago but only recently realized
I've this question about pass some instances by ref or not: here is my
I have seen this question about deploying to WebSphere using the WAS ant tasks.
Follow up to this question about GNU make : I've got a directory, flac
This is sort of the Java analogue of this question about C# . Suppose

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.