Error upgrading to Kotlin 1.2.60, Android Studio 3.1.3


April 2019


330 time


Pretext: I have 3 build variants for my project apart from release and debug I also have the staging variant.

Gradle sync works completely fine with version 1.2.51, but as soon as I upgrade to version 1.2.60, which released recently, gradle sync fails with the following error message:

Could not find method kapt() for arguments [[email protected]] on object of type

Any help/ insight on this would be really great, I tried searching for a while, but was stuck on what to search exactly, what I think could be the issue here is the kapt plugin as the changelog mentions changes in it, chec this, but couldn't get it running.


Top level gradle:

dependencies {
        classpath ''
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "io.realm:realm-gradle-plugin:$realm_version"
        classpath ''

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath ''
        classpath ''
        classpath ''

App level:

apply plugin: ''

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'

apply plugin: 'realm-android'
apply plugin: 'io.fabric'
apply plugin: ''

PS: I'm on Gradle plugin 4.9, Studio 3.1.3 and android gradle plugin 3.3.0-alpha03.

Thank you.

1 answers


I found the solution to this, in case anyone struggles with it,

The problem:

I had a module dependency, which was using some kapt methods but hadn't included

apply plugin: 'kotlin-kapt' in it's project level build.gradle file.

I added it and voila, it works.