Issue
So basically, I have an app which has thousands of downloads and some users (around 200) see their app crashing on an activity with this exception
android.content.res.Resources$NotFoundException:
at android.content.res.Resources.getStringArray (Resources.java:1391)
So here is where the code crash (at the second line) :
int arrayId = getResources().getIdentifier(ct, "array", view.getContext().getPackageName());
String[] ctOp = getResources().getStringArray(arrayId);
The array I retrieve has this tools:ignore="MissingTranslation" and it is only in values folder (nothing in values-XX for example).
Another thing is that all people who contacted me about this crash come from Turkey.
Solution
I found the issue, I was doing this :
ct = ct.toLowerCase();
And apparently in Turkish there is a bug if you do it this way so you need to do it like that :
ct = ct.toLowerCase(Locale.ENGLISH);
Same for toUpperCase
For more information about this bug, click here
Answered By - Khrys aka Louis
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.