我在资源文件arrays.xml中有大量字符串(大约800个项目) 当尝试阅读时:
String[] arr = context.getResources().getStringArray(R.array.text);
我收到错误:
ReferenceTable overflow (max=512)
Last 10 entries in JNI local reference table:
502: 0x44ea8b28 cls=Ljava/lang/String; (28 bytes)
503: 0x44ea8c98 cls=Ljava/lang/String; (28 bytes)
504: 0x44ea8df0 cls=Ljava/lang/String; (28 bytes)
505: 0x44ea8f20 cls=Ljava/lang/String; (28 bytes)
506: 0x44ea8f98 cls=Ljava/lang/String; (28 bytes)
507: 0x44ea9070 cls=Ljava/lang/String; (28 bytes)
508: 0x44ea91a0 cls=Ljava/lang/String; (28 bytes)
509: 0x44ea9328 cls=Ljava/lang/String; (28 bytes)
510: 0x44ea94c8 cls=Ljava/lang/String; (28 bytes)
511: 0x44ea9618 cls=Ljava/lang/String; (28 bytes)
JNI local reference table summary (512 entries):
3 of Ljava/lang/Class; 172B (2 unique)
506 of Ljava/lang/String; 28B (506 unique)
1 of Ljava/lang/String; 36B
1 of [Ljava/lang/String; 28B
1 of [Ljava/lang/String; 3212B
Memory held directly by native code is 17788 bytes
Failed adding to JNI local ref table (has 512 entries)
如何解决这个问题?