I'm doing:
FileReader fin = new FileReader("file:///android_asset/myFile.txt");
in an Android project and many variations. At runtime I get a file not found exception. The file is present and correct in the assets folder, so my path must be wrong.
What is the absolute path I need here?
Can you use something like
I found that if you are using an IDE like Eclipse you may need to do a clean -- or delete the API in the bin directory. It seems that the assets isn't getting updated when you do a build.
Its not reading it because all assets in assets folder are compressed, try changing its extension to .mp3 then read it in, that should stop it from being compressed.
Try using the above with FileDescriptors. Seems to be the most foolproof way I've found to gather asset paths.