Invalid resource directory name (Eclipse)-Collection of common programming errors

However any text I write in this file causes a compiler error

You can not write anything in Assets at runtime. Assets folders don’t exist on the phone. They’re compiled into the package. Assets only provides reading facility.

If you want to write something, please use your external directory or Cache Directory provided by application.

Take a look at Storage Options.