Android not responding when running Random().nextInt(x)

Viewed 31

I am - fairly frequently - seeing my app using Random().nextInt(x) producing an "Android Not Responding" error when generating random numbers (x = 10, so it's not particularly high either). ANR of course means it has basically paused the app for several seconds, which seems unnecessary given that this is just a simple random number generation.

Curious if others have encountered similar issues, and what - if anything - was done to mitigate the issue.

0 Answers
Related