Android Question #AdditionalRes and strange behaviour

leitor79

Active Member
Licensed User
Longtime User
Hello,

I have the module attribute like this:

#AdditionalRes: "..\resource"

And a folder structure like this:

2017-10-31 01_47_43.png



I've learn that, to avoid setting a resource file read only again each time i need to edit it, I could use the #additionalres and put it into the resources\xml folder, right?

So, I have an xml file (myfile.xml) in the objects\res\xml folder. I've moved the whole object\res structure to the resources folder referenced in the #additionalres attribute, so now myfile.xml is now in the resource\xml folder.

But I've noticed that:

- Using the file located in objects\res\xml and set read only mode, my project works.

- Using the file located in resource\xml file, my project doesnt work. A myfile.xml is generated in the object\res\xml folder... but the file is different than the one located in resources\xml folder (missing xml attributes and values)!

- If i manually delete the objects\res\xml\myfile.xml file, it is re-generated after I hit ctrl+P to "clean" the project files, or If i re compile (release mode). The generated file is also different (it's similar, but different).


My project uses widgets; I don't know if some code (like configurehomewidgets) could generate that file and how to prevail the additionalres one?

Regards!
 

leitor79

Active Member
Licensed User
Longtime User
That's exactly what is happening, thank you very much.

However, I have set the instruction:

B4X:
#CustomBuildAction: 1, c:\windows\system32\attrib.exe, +r res\*.* /s

It seems not to be working? Or the custombuildactions doesn't work here since this is not a build action?

I also thought that the resource/xml should prevail over the object/res/xml, but if it doesn't I'm sure that there is a good reason and you know better than me.

thank you very much!
 
Upvote 0
Top