I was trying to delete files from local storage on the Android Lollipop by the following line:
new File(path).delete();
Deleting file that resides in Internal storage works fine. But failed to do so on file that is located on external removable storage. I've checked that the file do exists but cannot be overwritten. Moreover, permission has already been granted to the app.
In order to read or write files on the external storage, your app must acquire the READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE system permissions.
As stated in the documentation, no luck though.
Googled for available solutions, but doesn't satisfy the problem.