Android Configuration with name 'kapt' not found

I had the same issue but I was lacking the line

apply plugin: 'kotlin-kapt'

After briefly trying, I found that adding the line before apply plugin: 'realm-android' works for me.

In my case the top part of my working build.gradle looks like this:

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'

So please try the following:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.jakewharton.hugo'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'realm-android'

And if that doesn't work, try moving the line directly above the apply realm plugin line (i.e. below the hugo and bintray plugins).


Try putting:

apply plugin: 'kotlin-kapt'

before:

apply plugin: 'realm-android'

I had the same issue and this worked for me

Tags:

Android