ANR Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing certain input events that were delivered to it over
This happened to me when I had a loop and there was a condition for the loop to get incremented. I had not set the increment for when the condition was not met. Hence, the loop stalled. This resulted in the above error.
Without your code, I cannot help. But the above is a possible cause of your error.