As you can see, your ArrayIndexOutOfBounds
is the bottommost "caused by" exception in the stack trace.
There are other catch
blocks in between that catch your exception and wrap it to another exception using Exception(String,Throwable)
constructor. In this case this wrapper code is in the code that transforms your XML onClick
declaration to a OnClickListener
, with the intermediate InvocationTargetException
coming from Java reflection.
Ultimately the exception gets caught by the top-level exception handler that logs it as "FATAL EXCEPTION" and terminates your app. The log output includes all nested exceptions as well.