Updating a raw resource in an Android app

后端 未结 1 2037
轮回少年
轮回少年 2021-01-22 04:56

my app is supposed to store some data in a text file. Every time when the app is started the data is read and every time the app is closed the data is wiped out from the text fi

1条回答
  •  离开以前
    2021-01-22 05:09

    If you want to write to a file packaged in the raw folder, you will have to copy it to the local file system first. Resources contained in your raw directory in your project will be packaged inside your APK and will not be writeable at runtime. Consider looking at the Internal or External Data Storage APIs.

    0 讨论(0)
提交回复
热议问题