I am using xamarin ide to create and output an APK. I need to store json configuration files, so I keep them under resource / config.
The file is set to AndroidResource when I try to create a project, I get the following error:
Invalid resource directory name "res config" .
Whatever I tried:
- Renaming files in resources
- Setting up any file's construction => Build is working but files of resources disappears.
Resources are not referenced in any way Resource.designer.cs.
Anyone have any idea about how to solve this mistake? Thank you.
You should store .json files in your / property
Instead, you can use the related methods to open them:
context. Resources. OpenRao Resource (Resources. Raw.filename)
context.Resources. Set. Open ("filename")
Use / Resource / Raw When you need to generate an actual resource ID, otherwise it should remain inside the / property folder.
No comments:
Post a Comment