This is my post in stackoverflow(long code) and I am having an issue with spannablestring where it is giving me index out of bound error and crashes only on some devices. The errors were reported by Firebase crashlytics and it is shown below. Any help will be appreciated.
What's a SpannableString? Is it an android class? If so, I shall move you to the Android forum. How did you get an index of −1? Where are you calling the setSpan() method? We can only help if we know the full details.
Please tell the people on SO about your post here.
So the stack trace does not actually contain any of your lines of code? So it's probably got nothing to do with your call to setSpan (although you should properly guard against that, as suggested on SO). I've been seeing GUI exceptions like this in my app (in Crashlytics) for years, and have just learned to live with it (it never happened to a device/android version combination I had, so there wasn't much I could do to debug). It's Android code that is crashing, not your code, so there may not be much you can do about it.
Sorry; I missed that bit. How do you sort out that exception if you aren't causing it yourself? Do you reinstall the OS or something? If yu hae a certain version of Android on different devices, that would explain why the error is device specific.
What's wrong? Where are you going? Stop! Read this tiny ad: