Skip to content Skip to sidebar Skip to footer

Android - Assets Files Path

I have problem with assets files path in android studio. I want give path of text file in assets folder like below: File f = new File(path_of_text_file_in_assets); fw = new FileWri

Solution 1:

You cannot use the File class for files in assets. File is for files in the file system.

The only way to handle assets files is indeed with that .open() function using the input stream.

Further you cannot write to files in assets. They are read only there.

FileWriter and FileReader both cannot be used.

Post a Comment for "Android - Assets Files Path"