Kotlin 1.2.60 is out!

We’re happy to announce the release of Kotlin 1.2.60, a new bugfix and tooling update for Kotlin 1.2. This release:

  • Adds optional expected annotations to multiplatform projects
  • Allows building multiplatform projects with IntelliJ IDEA
  • Introduces experimental kapt mode aimed to speed up Gradle builds
  • Adds new refactorings, inspections, and intentions to the IntelliJ IDEA plugin
  • Fixes a lot of known issues in the compiler and the IDE plugin and provides performance improvements

The update is compatible with all versions of IntelliJ IDEA from 2017.2 to 2018.2, as well as with Android Studio 3.1, 3.2 Beta, and 3.3 Canary.

We’d like to thank our external contributors whose pull requests were included in this release: Toshiaki Kameyama, Ivan Gavrilovic, Juan Chen, Raluca Sauciuc, Valeriy Zhirnov, Evgeny Zakharov, Derek Schaller, Egor Neliuba, Lucas Smaira, Miha-x64, Mon_chi, Rodrigo B. de Oliveira, Tudor Luca, cobr123, and Kenji Tomita

The complete list of changes in this release can be found in the changelog. Read on for the highlights.

Multiplatform projects update

Optional expectation for annotations

This update introduces the @OptionalExpectation annotation that is suitable for marking expect annotation class declarations in common code whose actual counterparts may be omitted in the platform implementations. Doing so will then make the compiler ignore the annotations on the common declarations during compilation of the platform modules that have no corresponding actual annotation class.

This change, in particular, will allow for using annotations such as @JvmName and @JsName in common code of a multiplatform project. We’re planning to provide these annotations in kotlin-stdlib-common starting with 1.2.70.

Building a multiplatform project with IntelliJ IDEA

A multiplatform project may now be built with the integrated build system of IntelliJ IDEA without delegating the task to Gradle, which improves build times for IDE run configurations. These builds already benefit from incremental compilation of Kotlin code.

Kapt improvements

In addition to performance improvements, we added an experimental option to run kapt, the Kotlin annotation processing tool, directly using Gradle workers. In some cases, this may significantly improve the overall build speed. To switch to the Gradle worker implementation, add the kapt.use.worker.api=true key to the gradle.properties file. Note that it is only available with Gradle 4.3 and above. We plan to enable it by default in Kotlin 1.2.70, so we kindly ask for your feedback. Please let us know if you have any problems with the Worker API option enabled.

Besides, information messages produced by the annotation processors used with kapt, which were shown as warnings in Gradle builds, are now printed with the INFO logging level for cleaner build outputs. To revert to the old behavior and print them as warnings, set the Gradle project property kapt.info.as.warnings to true in the gradle.properties file.

IntelliJ IDEA support improvements

Quick fixes for wrapping a value into a collection

There’s a new quick fix for wrapping a value into a singleton list, set, array, or sequence on type mismatch and corresponding postfix templates for the functions listOf, setOf, arrayOf, sequenceOf:

Other improvements in the IntelliJ IDEA plugin

  • A quick fix for removing the lateinit modifier when it conflicts with a custom property accessor
  • A quick fix to either move a const val property into the companion object or remove an illegal const modifier
  • An intention for replacing String.format(...) with a string template
  • Other useful inspections and intentions
  • Lots of bug fixes and performance improvements

Changes in the compiler

The Kotlin 1.2.60 update fixes a lot of known issues in the compiler and delivers performance and stability improvements.

New deprecations

New checks were added for the following erroneous constructs:

  • Smart casts of local delegated properties that led to type safety guarantees violation and runtime failures (KT-22517)
  • Annotation arguments erroneously accepted even though they are not compile time constants (KT-23153)
  • Java static member usages that were inconsistent with Kotlin companion object members visibility (KT-25333)
  • Annotations with EXPRESSION target and non-SOURCE retention (KT-13762)

All of these are reported as warnings in Kotlin 1.2.60+ and will become errors in Kotlin 1.3. The corresponding checks already report errors in the progressive compiler mode (with the -Xprogressive flag).

How to update

To update your IntelliJ IDEA or Android Studio plugin, use Tools | Kotlin | Configure Kotlin Plugin Updates and click the “Check for updates now” button.

Also, don’t forget to update the compiler and standard library version in your Maven and Gradle build scripts.

As usual, if you run into any problems with the new release, you’re welcome to ask for help on the forums, on Slack (get an invite here), or to report issues in the issue tracker.

Let’s Kotlin!

This entry was posted in Releases and tagged . Bookmark the permalink.

30 Responses to Kotlin 1.2.60 is out!

  1. Maksim Kostromin says:

    Who tested it with latest spring-boot 2 release?

  2. Anindya Chatterjee says:

    I am using kotlin-kapt plugin in my gradle project. After upgrading compiler to 1.2.60 gradle build is ok. But when I try to run my app from IDEA after upgrading the plugin also, during build phase I am getting below exception:

    Error:Kotlin: [Internal Error] java.lang.IllegalStateException: The provided plugin org.jetbrains.kotlin.kapt3.Kapt3ComponentRegistrar is not compatible with this version of compiler
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.(KotlinCoreEnvironment.kt:198)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.(KotlinCoreEnvironment.kt:117)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:446)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:295)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:147)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:51)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:94)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:50)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:88)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$$inlined$ifAlive$lambda$1.invoke(CompileServiceImpl.kt:402)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$$inlined$ifAlive$lambda$1.invoke(CompileServiceImpl.kt:101)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:929)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:101)
    at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:969)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:928)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:400)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:844)
    Caused by: java.lang.AbstractMethodError
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.(KotlinCoreEnvironment.kt:190)
    … 33 more

    The same project was working fine under 1.2.51. My ide verison is – Build #IU-182.3684.101, built on July 24, 2018

    • one guy says:

      I have the same problem.

    • Elviss says:

      I remember seeing this issue when sdkman.io Kotlin was in path.

    • David says:

      I have the same problem, only when the kotlin-kapt gradle plugin is enabled.

      I don’t have sdkman kotlin at all.

    • Zach Pearce says:

      Same here, and not using sdkman.

    • R.A. Porter says:

      My colleague is on Windows and is having the same issue (I do not have the particulars of his Windows version). We’re running gradle 4.9 through gradlew and he sees the error both through IJ and at the command line. In an effort to resolve, I was going to have him try adding the new kapt.use.worker.api=true value in gradle.properties.

      However, when I tried that locally (Mac OSX), I got the following error:

      where the referenced static import is a method on a companion object annotated with @JvmStatic.

      At this point, we’re going to have to downgrade back to 1.2.51 and hope there’s an patch forthcoming that will work across operating systems and not blow up on @JvmStatic-annotated fields/functions.

    • Andrew Munn says:

      Hitting the same issue on OS X. Holding off on upgrading until there is a fix posted. Strangely, a coworker doesn’t have this problem and we’re both running identical setups.

    • Timur says:

      I have same problem.

    • Cristian says:

      Same here. Has anyone been able to work around this?

    • Martijn Blankestijn says:

      Same problem here,
      running on macOS 10.13.6, IntelliJ IDEA 2018.2.1 (Ultimate Edition) Build #IU-182.3911.36, built on August 6, 2018, JRE: 1.8.0_152-release-1248-b8 x86_64

    • Vjekoslav Nesek says:

      I’ve been able to work around this issue by changing following setting:

      Preferences > Build,Execution,Deployment > Build Tools > Gradle > Runner

      Check: Delegate IDE build/run actions to gradle

  3. Tim says:

    We just tried 1.2.60 with kapt.use.worker.api=true. We get a build failure. It builds fine with kapt.use.worker.api=false.

    What went wrong:
    Execution failed for task ‘:Android:common:kaptDebugKotlin’.

    There was a failure while executing work items
    A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
    org.jetbrains.kotlin.kapt3.base.Kapt

    Try:
    Run with –info or –debug option to get more log output. Run with –scan to get full insights.
    Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:Android:common:kaptDebugKotlin’.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:105)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:66)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
    at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
    at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:273)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:258)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    Caused by: org.gradle.workers.WorkerExecutionException: There was a failure while executing work items
    at org.gradle.workers.internal.DefaultWorkerExecutor.workerExecutionException(DefaultWorkerExecutor.java:153)
    at org.gradle.workers.internal.DefaultWorkerExecutor.await(DefaultWorkerExecutor.java:147)
    at org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask.compile(KaptWithoutKotlincTask.kt:82)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:786)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:753)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
    … 33 more
    Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
    at org.gradle.workers.internal.DefaultWorkerExecutor$WorkerExecution.waitForCompletion(DefaultWorkerExecutor.java:272)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForItemsAndGatherFailures(DefaultAsyncWorkTracker.java:99)
    at org.gradle.internal.work.DefaultAsyncWorkTracker.waitForCompletion(DefaultAsyncWorkTracker.java:87)
    at org.gradle.workers.internal.DefaultWorkerExecutor.await(DefaultWorkerExecutor.java:145)
    … 48 more
    Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.kapt3.base.Kapt
    at org.jetbrains.kotlin.gradle.internal.KaptExecution.run(KaptWithoutKotlincTask.kt:109)
    at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:39)
    at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:46)
    at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:30)
    at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:101)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
    at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
    … 3 more

  4. Chris says:

    Can’t use it within AS 3.3 Canary for now.

    I’m going to the update dialog, install the update, restart AS -> update still shows up. :(

  5. Dmitriy says:

    In 1.2.60 I Have problems with kotlinx.serialization Library:

    Failed to notify project evaluation listener. > org.jetbrains.kotlinx.serialization.gradle.SerializationKotlinGradleSubplugin.getPluginArtifact()Lorg/jetbrains/kotlin/gradle/plugin/SubpluginArtifact;

    P.S. In 1.2.51 It work’s Fine
    Maybe I need to wait update of kotlinx.serialization ?

  6. Pingback: Kotlin 1.2.60 发布, 针对 1.2 系列的 bug 修复和工具升级 – 技术成就梦想

  7. Pingback: Интересные материалы для Android-разработчика #132 - Подкасты Android Dev

  8. Pingback: Kotlin 1.2.60 发布, 针对 1.2 系列的 bug 修复和工具升级 – 开源中国社区 – 技术成就梦想

  9. David Berry says:

    I have a “multiplatform” layout with android and common folders at the top level, up until 1.2.60 it was working fine. Just upgraded to 1.2.60 of the plugin in Android Studio and now I’m showing no source files in my common folder using the “Android” view. Any clues about what changed and how I fix it?

    My root build.gradle contains:
    buildscript {

    }

    My common/build.gradle contains:

    apply plugin: ‘kotlin-platform-common’

    dependencies {
    // Set up compilation dependency on common Kotlin stdlib
    compile “org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version”

    }

    • Liliia says:

      Have you tried to refresh the project with Gradle? Open Gradle projects view, then click Refresh all Gradle projects

  10. Nico says:

    For multiplatform. Is it possible to share code with a spring boot application?

  11. Igor Wojda says:

    If you use Android Parcelable you may hold with the update as there is a bug causing infinite loop
    https://youtrack.jetbrains.com/issue/KT-25839

  12. Max says:

    Hey JetBrains. It looks like a few packages (at least kotlin-scripting-gradle) didn’t get bumped to 1.2.60. Is this going to happen soon?

  13. Pingback: Error upgrading to Kotlin 1.2.60, Android Studio 3.1.3 - QuestionFocus

  14. Pingback: Kotlin 1.2.60: Multi-Plattform-Projekte & Verbesserungen beim Kotlin Annotation Processing Tool (KAPT) - JAXenter

  15. sai hiroshi says:

    Android Studio Compile error with 1.2.60.
    How to Slove it?

    java.lang.Exception: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: unrecognized method hash: method not supported by remote object
    at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:60)
    at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:59)
    at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compileWithDaemon(GradleKotlinCompilerRunner.kt:220)
    at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compileWithDaemonOrFallback(GradleKotlinCompilerRunner.kt:165)
    at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.compileWithDaemonOrFallback(GradleKotlinCompilerRunner.kt:62)
    at org.jetbrains.kotlin.compilerRunner.KotlinCompilerRunner.runCompiler(KotlinCompilerRunner.kt:133)
    at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunner.runJvmCompiler(GradleKotlinCompilerRunner.kt:117)
    at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompiler$kotlin_gradle_plugin(Tasks.kt:388)
    at org.jetbrains.kotlin.gradle.internal.KaptGenerateStubsTask.execute(KaptGenerateStubsTask.kt:99)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.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:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:745)
    Could not connect to kotlin daemon. Using fallback strategy.
    warning: the ‘-d’ option with a directory destination is ignored because ‘-Xbuild-file’ is specified
    exception: java.lang.ClassCastException: java.util.Collections$UnmodifiableCollection cannot be cast to java.util.Set
    at org.jetbrains.kotlin.android.synthetic.AndroidComponentRegistrar.registerProjectComponents(AndroidComponentRegistrar.kt:154)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.(KotlinCoreEnvironment.kt:179)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.(KotlinCoreEnvironment.kt:117)
    at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:413)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:276)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:154)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:63)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:108)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:52)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:92)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:70)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:36)
    at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:157)
    at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:148)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:339)
    at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)

    • alexeybelkov says:

      Sorry for the late reply. Please try the new Kotlin version 1.2.61. If the problem still occurs, could you please create a YouTrack issue at http://kotl.in/issue and share your project (can be done privately), so we can try to reproduce this problem? Thank you.

Comments are closed.