android Strange bug with long XML files in android. Android XML parsing bug with large resource files - TypedArray.length() returns incorrect count for long XML arrays, solved by reordering array definitions to put references before actual content.