Error "open failed: ENOENT (No such file or directory)"

633 Views Asked by At

I have a code that worked well on eclipse and now I moved to Android Studio and there for some reason I cannot open the .xls file.

I am using jxl librariy, so I added the jar to the project's lib, and: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> to the manifest. The code for opening the file is:

final String EXCEL_FILE_LOCATION = "src/exercise.xls";
    Workbook workbook = Workbook.getWorkbook(new File(EXCEL_FILE_LOCATION));

The file and the directory both exist for sure and yet it throws the exeption W/System.err: java.io.FileNotFoundException: src/exercise.xls: open failed: ENOENT (No such file or directory)

What am I doing wrong?

0

There are 0 best solutions below