在Android Studio将项目打包成apk文件后,在手机上安装apk后,发现项目中要进行读取的hello.txt不存在。错误提示:java.io.FileNotFoundException: /data/user/0/com.example.demo/files/hello.txt: open failed: ENOENT (No such file or directory)。
我在项目中是利用Context进行数据的存储和读取,所以hello.txt文件是存储在/data/user/0/com.example.demo/files目录下的,但项目打包成apk手机安装后找不到hello.txt。怎样才能将hello.txt也包含进去,即用户安装apk后就能直接读hello.txt