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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:31:51+00:00 2026-05-24T02:31:51+00:00

I keep getting this error 07-28 19:32:40.536: ERROR/error(534): java.io.IOException: No such file or directory

  • 0

I keep getting this error

07-28 19:32:40.536: ERROR/error(534): java.io.IOException: No such file or directory
07-28 19:32:40.536: ERROR/error(534):     at java.io.File.createNewFileImpl(Native Method)
07-28 19:32:40.536: ERROR/error(534):     at java.io.File.createNewFile(File.java:1115)
07-28 19:32:40.536: ERROR/error(534):     at com.fttech.gameIT.MainMenu.putBitmapInDiskCache(MainMenu.java:447)

Here is my putBitmapInDiskCache()

    public void putBitmapInDiskCache(URI imageUri, Bitmap avatar) {   

                    File cacheDir = new File(this.getCacheDir(), "thumbnails");    
                    File cacheFile = new File(cacheDir, ""+imageUri.hashCode());     
                    try {      
                    cacheFile.createNewFile();       
                    FileOutputStream fos = new FileOutputStream(cacheFile);    
                    avatar.compress(CompressFormat.PNG, 100, fos);       
                    fos.flush();       
                    fos.close();    
                    } catch (Exception e) {       
                    Log.e("error", "Error when saving image to cache. ", e);    

                    }  



                    }

EDIT: That worked! Now i get this…

07-28 19:56:31.525: ERROR/DEBUGTAG(573): java.io.FileNotFoundException: /881625833 (No such file or directory)
 07-28 19:56:31.525: ERROR/DEBUGTAG(573):     at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
  07-28 19:56:31.525: ERROR/DEBUGTAG(573):     at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:239)
07-28 19:56:31.525: ERROR/DEBUGTAG(573):     at java.io.FileInputStream.<init>(FileInputStream.java:88)
 07-28 19:56:31.525: ERROR/DEBUGTAG(573):     at java.io.FileInputStream.<init>(FileInputStream.java:122)
 07-28 19:56:31.525: ERROR/DEBUGTAG(573):     at com.fttech.gameIT.MainMenu$ImageAdapter.getView(MainMenu.java:297)
 07-28 19:56:31.525: ERROR/DEBUGTAG(573):     at android.widget.Gallery.makeAndAddView(Gallery.java:748)
 07-28 19:56:31.525: ERROR/DEBUGTAG(573):     at android.widget.Gallery.fillToGalleryLeft(Gallery.java:667)

Code i am using to retrieve the images from the cache..

try {


                                URL aURL = new URL(myRemoteImages[position]);



                                URI imageUri = null;
                                try {
                                    imageUri = aURL.toURI();
                                } catch (URISyntaxException e1) {
                                    // TODO Auto-generated catch block
                                    e1.printStackTrace();
                                }
                                if (new File(new File(myContext.getCacheDir(), "thumbnails"), "" + imageUri.hashCode()).exists())
                                {
                                    String cachFile = ""+imageUri.hashCode();
                                    FileInputStream fis;

                                    try {
                                        fis = new FileInputStream(cachFile);
                                        Bitmap bm = BitmapFactory.decodeStream(fis); 
                                         i.setImageBitmap(bm);
                                            i.setScaleType(ImageView.ScaleType.FIT_CENTER);
                                            /* Set the Width/Height of the ImageView. */
                                            if(Build.VERSION.SDK_INT >= 11){
                                                i.setLayoutParams(new Gallery.LayoutParams(450, 300));
                                            }
                                            else{
                                                i.setLayoutParams(new Gallery.LayoutParams(125, 125));
                                            }


                                    } catch (FileNotFoundException e) {

                                           Log.e("DEBUGTAG", "Remtoe Image Exception", e);





                                            /* Image should be scaled as width/height are set. */
                                            i.setScaleType(ImageView.ScaleType.FIT_CENTER);
                                            /* Set the Width/Height of the ImageView. */
                                            if(Build.VERSION.SDK_INT >= 11){
                                                i.setLayoutParams(new Gallery.LayoutParams(450, 300));

                                            return i;
                                            }
                                                i.setLayoutParams(new Gallery.LayoutParams(125, 125));
                                                return i;
                                            }
  • 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-05-24T02:31:51+00:00Added an answer on May 24, 2026 at 2:31 am

    You are missing a cacheDir.mkdirs() call. Do that and then do File cacheFile...

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

Sidebar

Related Questions

I keep getting this error: cannot convert parameter 1 from 'char' to 'LPCWSTR' int
I keep getting this error when I try and run this script. It has
I keep getting this error when I try and view my register user page
I keep getting this error in my windows logs: SharePointSocialNetworking.Facebook b0ceb144-b183-4b66-aa10-39fd9ee42bd4 Could not load
I keep getting this error whenever I run unit tests in IntelliJ IDEA: /home/egervari/IdeaProjects/jobprep-stable/src/main/resources/dict/noun.txt
I keep getting this error when trying to view my channels controller. uninitialized constant
I keep getting this error on Heroku but not locally. any idea why that
I keep getting this error in my production enviroment OpenSSL::SSL::SSLError (hostname was not match
I keep getting this error and I think it's a Bug but I would
I keep getting this error: Code Sign error: The identity 'iPhone Developer' doesn't match

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.