Basically you can not modify the resources of your app. They are read-only after build.
You can write data to sd card and modify it then use. On Mar 12, 10:07 pm, RV <[email protected]> wrote: > Hi, > I am stuck on this for a very long. > I have my txt file in res/raw/myfile.txt. > I want to append some text into this file. But I am unable to do so. > I used the code as follows: > > FileOutputStream out = context.openFileOutput( > "res/raw/myfile.txt", > > Context.MODE_WORLD_WRITEABLE > | > Context.MODE_APPEND); > > OutputStreamWriter osw = new > OutputStreamWriter(out); > > osw.write(entry); > osw.flush(); > osw.close(); > > It is not giving any error but also do nothing to my file. > > Also How could I edit only the 1st line of my file. (my file contain > huge data.) > > Any help will be appreciated. > > Thank you > > RV -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

