add files to root and access it within Android Studio Project

149 Views Asked by At

in java you could add the file within the project so you could use it on any device, i.e if the file is "data.dat" in java I could put the file in the project root and write this line

try (ObjectInputStream input = new ObjectInputStream(new FileInputStream("data.dat')))

unfortunately I couldn't do this in android studio can someone please explain

in Android Studio it always gives me FileNotFoundException, I even tried using the absolute path but it didn't work, any Idea on how to do it?

0

There are 0 best solutions below