3
E/UpdatesSettings( 7146): File write failed: java.io.IOException: open failed: EBUSY (Device or resource busy)
I/DownloadManager( 7621): Initiating request for download 11
W/DownloadManager( 7621): Aborting request for download 11: while opening destination file: java.io.FileNotFoundException: /storage/sdcard0/sysupdater/***.partial: open failed: EBUSY (Device or resource busy)
D/DownloadManager( 7621): cleanupDestination() deleting /storage/sdcard0/sysupdater/***.partial

I use DownloadManager to download file,sometimes it come out like this. Can anyone tell me why and how to solve this problem??

Jack
  • 10,943
  • 13
  • 50
  • 65
tang
  • 55
  • 6

1 Answers1

1

I've encountered a similar problem.

To avoid FileNotFoundException, make sure you:

  1. Add the required permissions to write to external storage (if that's where you're trying to save), add the following into the AndroidManifest.xml:

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    
  2. Create the subfolder you're attempting to download into:

    File folder = new File(FOLDER_PATH);
    if (!folder.exists()) {
        folder.mkdir();
    }
    
Tom Susel
  • 3,397
  • 1
  • 24
  • 25