我得到這個錯誤,無法找出原因:科特林的Android編譯
Error:Execution failed for task ':app:compileDebugKotlin'.
> java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: 0
我認爲這與Android的gradle這個插件版本與科特林gradle這個插件版本兼容的事情。我沒有升級任何東西,它以前工作過。但突然間,這只是開始出現,並阻止編譯過程。
有沒有公共場所,我可以找到基於最新Kotlin插件的最新的android studio插件?
感謝進步, Ĵ
StackTrade:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugKotlin'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.gradle.api.UncheckedIOException: java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: 0
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:78)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:245)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:232)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 14 more
Caused by: java.io.IOException: java.lang.ArrayIndexOutOfBoundsException: 0
at org.jetbrains.kotlin.com.intellij.util.io.CompressedAppendableFile.loadChunk(CompressedAppendableFile.java:207)
at org.jetbrains.kotlin.com.intellij.util.io.CompressedAppendableFile.access$700(CompressedAppendableFile.java:36)
at org.jetbrains.kotlin.com.intellij.util.io.CompressedAppendableFile$FileChunkReadCache.get(CompressedAppendableFile.java:482)
at org.jetbrains.kotlin.com.intellij.util.io.CompressedAppendableFile$SegmentedChunkInputStream.read(CompressedAppendableFile.java:522)
at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMapValueStorage.readBytes(PersistentHashMapValueStorage.java:376)
at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.doGet(PersistentHashMap.java:510)
at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:464)
at org.jetbrains.kotlin.incremental.storage.LazyStorage.get(LazyStorage.kt:67)
at org.jetbrains.kotlin.incremental.IncrementalCacheImpl$SourceToClassesMap.get(IncrementalCacheImpl.kt:558)
at org.jetbrains.kotlin.incremental.IncrementalCacheImpl.classesBySources(IncrementalCacheImpl.kt:128)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler(Tasks.kt:445)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler(Tasks.kt:151)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:117)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
... 20 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.iq80.snappy.SnappyDecompressor.readUncompressedLength(SnappyDecompressor.java:410)
at org.iq80.snappy.SnappyDecompressor.uncompress(SnappyDecompressor.java:38)
at org.iq80.snappy.Snappy.uncompress(Snappy.java:37)
at org.jetbrains.kotlin.com.intellij.util.CompressionUtil.readCompressedWithoutOriginalBufferLength(CompressionUtil.java:97)
at org.jetbrains.kotlin.com.intellij.util.io.CompressedAppendableFile.decompress(CompressedAppendableFile.java:370)
at org.jetbrains.kotlin.com.intellij.util.io.CompressedAppendableFile.loadChunk(CompressedAppendableFile.java:191)
... 33 more
BUILD FAILED
請使用--stacktrace選項運行您的構建並編輯您的問題以包含t他跟蹤;這將有助於瞭解您遇到的問題。 – yole
@yole請你檢查一下。我已經添加了堆棧跟蹤 –
您好,您的數組似乎是空的,請檢查這一行'org.iq80.snappy.SnappyDecompressor.readUncompressedLength(SnappyDecompressor.java:410)' – piotrek1543