caused By:java.lang.arrayindexoutofboundsexception:4at com.android.tools.profiler.asm.classreader.a (Unknown SOURCE) at Com.android.tools.profiler.asm.classreader.a (Unknown source) at COM.ANDROID.TOOLS.PROFILER.ASM.CLASSREADER.A (Unknown Source) at Com.android.tools.profiler.asm.classreader.b ( Unknown source) at Com.android.tools.profiler.asm.ClassReader.accept (Unknown source) at Com.android.tools.profiler.asm.ClassReader.accept (Unknown Source)
Compile the above problem, you may wish to continue to trace the error log above.
I found the following error log:
* What went wrong:execution failed for task ': Xxx:transformclasseswithprofilers-transformforzhaodebug ' .>-Try:Run With--DEBUG option to get more log output.* Exception is:org.gradle.api.tasks.TaskExecutionException:Execution failed fo R task ': Xxx:transformclasseswithprofilers-transformforzhaodebug '. at Org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions ( EXECUTEACTIONSTASKEXECUTER.JAVA:100) at Org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute (EXECUTEACTIONSTASKEXECUTER.JAVA:70) At Org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute (skipuptodatetaskexecuter.java:63) at Org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute ( RESOLVETASKOUTPUTCACHINGSTATEEXECUTER.JAVA:54) at Org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute (validatingtaskexecuter.java:58)
This can be found to be caused by a configuration error with profilers.
Solve:
In Androidstudio run/debug configurations uncheck the following:
Androidstudio compilation appears caused By:java.lang.arrayindexoutofboundsexception:4 one of the reasons