Following the Android sample for populating a ListView, I query an array from my strings.xml using Activity.getResource().getStringArray():
String [] mDefinitions = getResources().getStringArray(R.array.definition_array);
The documentation for this method is pretty clear and I didn't expect to encounter any problems with it:
Return the string array associated with a particular resource ID.
This approach worked as expected for small data sets. However, when I populated strings.xml with the full data set (close to 2000 entries), I find that the app crashed when it tried to load the resource. I noticed this error in the console log:
ReferenceTable overflow (max=512)
Playing around with the number of items in my string-array I confirmed that the error was reproducible when the number of items exceeded ~700 entries.
Googling the problem has turned up some examples of other developers having the same problem, but I can't find anything in the Android documentation to explain it.
Someone has gone to the trouble of creating an issue for the problem on the Android Google Code page but neither it, or any of the posts I came across, received a satisfactory answer.
Am I approaching the problem the wrong way? Should I be populating the data myself (loading a file and parsing JSON or similar) and avoid the issue entirely? It feels like I am missing something obvious here.