- Home /
build android apk that contain Resource XML
I'm trying to load an XML file and accesses it in an android application.
On unity i have the file: "Assets/Resources/cont.xml"
On mine code:
TextAsset textAsset = Resources.Load("cont") as TextAsset;
XmlDocument xd = new XmlDocument ();
xd.LoadXml ( textAsset.text );
When i build the project, the folder "Resources" doesn´t exist on apk
Hi,
did you succeed in finding a solution for this? I am having the same problem. Works fine on editor and windows build as well as I do a build and run for android. However, when building an apk the resource is not loaded.
Cheers $$anonymous$$
Answer by p1t0 · Mar 12, 2015 at 03:34 PM
check if the name of the files are correct on the code. Case sensitive.
check the name of the folder. Case sensitive.
open the apk. in the directory "assets\bin\Data" check if contains strange files like:
b67d5d009c32a96429f730729b70d199
eab129bf50308d8428b84bd0d0baf3f8
they are yours xmls files.
thanks,
I actually just found the problem. It turns out that the I had checked the option to split the apk (in publish settings). It turns out that Resources.Load does not work in this case.
Cheers To;