AndroidStudio編譯出現Caused by: java.lang.ArrayIndexOutOfBoundsException: 4其中一種的原因


Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
	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.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)

  編譯出現上述問題,不妨往錯誤日志的上文繼續跟蹤。

 

我發現如下錯誤日志:

* What went wrong:
Execution failed for task ':XXX:transformClassesWithProfilers-transformForZhaoDebug'.
> 4

* Try:
Run with --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for 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)

  如此可以發現是某個with profilers的配置錯誤造成的。

解決:

在AndroidStudio中Run/Debug Configurations取消勾選如下:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM